mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-07 02:58:21 +00:00
Avoid error catching
This commit is contained in:
parent
ff3cb032a6
commit
2493eb794f
1 changed files with 1 additions and 7 deletions
|
@ -134,13 +134,7 @@ client = (
|
||||||
) # or create_http_client() depending on the environment you picked
|
) # or create_http_client() depending on the environment you picked
|
||||||
|
|
||||||
# List available models
|
# List available models
|
||||||
|
models = client.models.list()
|
||||||
try:
|
|
||||||
models = client.models.list()
|
|
||||||
except ValueError as e:
|
|
||||||
print(e)
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
print("--- Available models: ---")
|
print("--- Available models: ---")
|
||||||
for m in models:
|
for m in models:
|
||||||
print(f"- {m.identifier}")
|
print(f"- {m.identifier}")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue