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.
|
True if model is available, False otherwise.
|
||||||
"""
|
"""
|
||||||
try:
|
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)
|
return any(m["name"] == model or m["name"].startswith(model)
|
||||||
for m in response.get("models", []))
|
for m in models)
|
||||||
except Exception:
|
except Exception:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@@ -109,8 +110,8 @@ class OllamaClient:
|
|||||||
List of available models with their details.
|
List of available models with their details.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
response = ollama_lib.list()
|
list_result = ollama_lib.list()
|
||||||
return response.get("models", [])
|
return list_result.get("models", [])
|
||||||
except Exception:
|
except Exception:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user