Spaces:
Running
Running
my_jq_query=$(cat << JQ | |
[.data[] | select(.status | test("idle|live|unhealthy"))] | |
| [group_by(.model_class)[] | { key: .[0].model_class, value: ([.[].id] | sort) }] | from_entries | |
JQ | |
) | |
capi /v1/models | jq "$my_jq_query" > model-cache.json | |