Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ollama not working. #57

Closed
amjiddader opened this issue Mar 22, 2024 · 5 comments
Closed

Ollama not working. #57

amjiddader opened this issue Mar 22, 2024 · 5 comments

Comments

@amjiddader
Copy link

amjiddader commented Mar 22, 2024

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'

@amjiddader amjiddader changed the title How to use Ollama Ollama not working. Mar 22, 2024
@schueszy
Copy link
Contributor

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

@amjiddader
Copy link
Author

Thanks mate fixed ..

PR appreciated..

@haseeb-heaven
Copy link

haseeb-heaven commented Mar 23, 2024

Its fixed in one PR not merged yet that one is working for me.
#49

@darkanubis0100
Copy link

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'

@haseeb-heaven
Copy link

It has not been merged yet i just merged the repo itself to my code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants