You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code modified slightly from:
if ollama.client:
self.models["OLLAMA"] = [(model["name"], model["name"]) for model in ollama.models]
To:
if ollama.client:
try:
# Create tuples using the model name attribute
self.models["OLLAMA"] = [(model.model, model.model) for model in ollama.models]
except Exception as e:
print(f"Error loading Ollama models: {e}")
# Initialize with empty list if there's an error
self.models["OLLAMA"] = []
The text was updated successfully, but these errors were encountered:
Describe your issue
model["name"] -> model.model due to version change in Ollama (0.5.0 -> 0.5.4)
How To Reproduce
Steps to reproduce the behavior (example):
Expected behavior
Browser should respond and allow user to select search engine, select model, etc.
Screenshots and logs
The log file/stderr in the 'python devika.py' terminal indicates an error:
File "/devika/devika.py", line 63, in data
models = LLM().list_models()
File "/devika/src/llm/llm.py", line 71, in init
self.models["OLLAMA"] = [(model["name"], model["name"]) for model in ollama.models]
File "/devika/.venv/lib/python3.12/site-packages/ollama/_types.py", line 33, in getitem
raise KeyError(key)
KeyError: 'name'
Configuration
Additional context
The text was updated successfully, but these errors were encountered: