devika
devika copied to clipboard
Ollama not working.
Using Ollama : Errors on all models.
Used : codellama & gemma
Created a New project.
Using Ollama:gemma
Send any command
No response in UI/Web
In terminal getting below error.
24.03.23 01:24:48: root: INFO : Initializing Devika...
24.03.23 01:24:48: root: INFO : Initializing Prerequisites Jobs...
24.03.23 01:24:48: root: INFO : Loading sentence-transformer BERT models...
24.03.23 01:24:54: root: INFO : BERT model loaded successfully.
* Serving Flask app 'devika'
* Debug mode: off
Token usage: 321
Exception in thread Thread-241:
Traceback (most recent call last):
File "/root/.pyenv/versions/3.9.18/lib/python3.9/threading.py", line 980, in _bootstrap_inner
self.run()
File "/root/.pyenv/versions/3.9.18/lib/python3.9/threading.py", line 917, in run
self._target(*self._args, **self._kwargs)
File "/var/www/devika/devika.py", line 49, in <lambda>
target=lambda: Agent(base_model=base_model).execute(prompt, project_name)
File "/var/www/devika/src/agents/agent.py", line 264, in execute
plan = self.planner.execute(prompt)
File "/var/www/devika/src/agents/planner/planner.py", line 70, in execute
response = self.llm.inference(prompt)
File "/var/www/devika/src/llm/llm.py", line 53, in inference
model = self.model_id_to_enum_mapping()[self.model_id]
KeyError: '7B - Q4_0'
Got the same issue I changed model[1] to model[0] in following statement:
localStorage.setItem("selectedModel", model[0]);
You can find the statement in following function:
function selectModel(model) {
selectedModel = `${model[0]} (${model[1]})`;
localStorage.setItem("selectedModel", model[1]);
}
In file:
/devika/ui/src/components/ControlPanel.svelte
Thanks mate fixed ..
PR appreciated..
Its fixed in one PR not merged yet that one is working for me. https://github.com/stitionai/devika/pull/49
Not fixed yet (Same error in last commit "Full reinstall")
24.03.23 11:39:12: root: INFO : Booting up... This may take a few seconds
24.03.23 11:39:12: root: INFO : Initializing Devika...
24.03.23 11:39:12: root: INFO : Initializing Prerequisites Jobs...
24.03.23 11:39:12: root: INFO : Loading sentence-transformer BERT models...
24.03.23 11:39:16: root: INFO : BERT model loaded successfully.
* Serving Flask app 'devika'
* Debug mode: off
Token usage: 336
Exception in thread Thread-71:
Traceback (most recent call last):
File "/root/miniconda3/envs/devika/lib/python3.9/threading.py", line 980, in _bootstrap_inner
self.run()
File "/root/miniconda3/envs/devika/lib/python3.9/threading.py", line 917, in run
self._target(*self._args, **self._kwargs)
File "/root/devika/devika.py", line 49, in <lambda>
target=lambda: Agent(base_model=base_model).execute(prompt, project_name)
File "/root/devika/src/agents/agent.py", line 264, in execute
plan = self.planner.execute(prompt)
File "/root/devika/src/agents/planner/planner.py", line 70, in execute
response = self.llm.inference(prompt)
File "/root/devika/src/llm/llm.py", line 53, in inference
model = self.model_id_to_enum_mapping()[self.model_id]
KeyError: '7B - Q4_0'
It has not been merged yet i just merged the repo itself to my code.