Initial commit
This commit is contained in:
commit
8d1a045333
333 changed files with 41117 additions and 0 deletions
16
ii/scripts/ai/show-installed-ollama-models.sh
Executable file
16
ii/scripts/ai/show-installed-ollama-models.sh
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Get the list, skip the header, and extract the first column (model names)
|
||||
model_names=$(ollama list | tail -n +2 | awk '{print $1}')
|
||||
|
||||
# Build a JSON array
|
||||
json_array="["
|
||||
for name in $model_names; do
|
||||
json_array+="\"$name\","
|
||||
done
|
||||
|
||||
# Remove trailing comma and close the array
|
||||
json_array="${json_array%,}]"
|
||||
|
||||
# Output the JSON array
|
||||
echo "$json_array"
|
||||
Loading…
Add table
Add a link
Reference in a new issue