Spaces:
Running
Running
File size: 231 Bytes
a749f5b |
1 2 3 4 5 6 7 8 9 10 |
#!/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
|