try-this-model / cache-working-models.sh
wxgeorge's picture
:truck: move model-cache.json back to root ... needed for space.
77d9d41
raw
history blame
237 Bytes
#!/bin/bash
my_jq_query=$(cat << JQ
[.data[] | select(.status | test("idle|live"))]
| [group_by(.model_class)[] | { key: .[0].model_class, value: [.[].id] }] | from_entries
JQ
)
capi /v1/models | jq "$my_jq_query" > model-cache.json