fix: resolve CI issues - add cd app command and fix F821 ruff warnings
All checks were successful
CI / test (push) Successful in 14s
All checks were successful
CI / test (push) Successful in 14s
This commit is contained in:
@@ -38,9 +38,10 @@ class OllamaClient:
|
||||
True if model is available, False otherwise.
|
||||
"""
|
||||
try:
|
||||
response = ollama_lib.list()
|
||||
list_result = ollama_lib.list()
|
||||
models = list_result.get("models", [])
|
||||
return any(m["name"] == model or m["name"].startswith(model)
|
||||
for m in response.get("models", []))
|
||||
for m in models)
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
@@ -109,8 +110,8 @@ class OllamaClient:
|
||||
List of available models with their details.
|
||||
"""
|
||||
try:
|
||||
response = ollama_lib.list()
|
||||
return response.get("models", [])
|
||||
list_result = ollama_lib.list()
|
||||
return list_result.get("models", [])
|
||||
except Exception:
|
||||
return []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user