try-this-model / cache-working-models.sh
wxgeorge's picture
:sparkles: update model cache constructor to include all models
988b5a0
raw
history blame
231 Bytes
#!/bin/bash
my_jq_query=$(cat << JQ
[.data[] | select(.model_class)]
| [group_by(.model_class)[] | { key: .[0].model_class, value: ([.[].id] | sort) }] | from_entries
JQ
)
capi /v1/models | jq "$my_jq_query" > model-cache.json