mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-15 00:11:15 +03:00
Cleanup
This commit is contained in:
parent
9046890a37
commit
b374f2da51
@ -136,7 +136,9 @@ class OllamaClient(GenAIClient):
|
|||||||
"""Return available model names from the Ollama server."""
|
"""Return available model names from the Ollama server."""
|
||||||
try:
|
try:
|
||||||
response = self.provider.list()
|
response = self.provider.list()
|
||||||
return sorted(m.get("name", m.get("model", "")) for m in response.get("models", []))
|
return sorted(
|
||||||
|
m.get("name", m.get("model", "")) for m in response.get("models", [])
|
||||||
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning("Failed to list Ollama models: %s", e)
|
logger.warning("Failed to list Ollama models: %s", e)
|
||||||
return []
|
return []
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user