Skip to content

Commit c5c74ce

Browse files
committed
llama-stack-client-list-models.py
1 parent 4826e57 commit c5c74ce

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/python3
2+
3+
from llama_stack_client import LlamaStackClient
4+
5+
# uses LLAMA_STACK_CLIENT_BASE_URL
6+
for m in LlamaStackClient().models.list():
7+
try:
8+
print(m.custom_metadata.get("provider_id"), m.custom_metadata['model_type'], m.id)
9+
except Exception:
10+
try:
11+
print(m.model_type, m.identifier)
12+
except Exception:
13+
print(m)

0 commit comments

Comments
 (0)