devika icon indicating copy to clipboard operation
devika copied to clipboard

IndexError: list index out of range

Open CeyssensHelder opened this issue 1 year ago • 2 comments

Describe the bug Getting "IndexError: list index out of range" in "devika\src\agents\feature\feature.py" on line "response = response.split("~~~", 1)[1]"

To Reproduce Steps to reproduce the behavior: I asked to finish a index.html for a onepager, not sure if this will be reproduced on every onepager. Background: it first made just a list with tasks, I asked to complete the tasks by itself and create the index.html.

Expected behavior Not give an error and finish the code.

Screenshots If applicable, add screenshots to help explain your problem. image

Desktop (please complete the following information):

  • OS: Win11
  • Search Engine: DuckDuckGo
  • Model: Mistral using Ollama

Additional context This keeps happening in this project when I ask something around finishing the code.

CeyssensHelder avatar Apr 05 '24 09:04 CeyssensHelder

mistral llm is asked to send the code in ~~~~ sign. However, if mistral is not trained with such a character, it sends the code without these signs. This is why this error is returned. If there is another way to separate code and text, it can be solved by trying

Ahmet0691 avatar Apr 05 '24 20:04 Ahmet0691

A new format and code block specific to programming language models should be added, it is not right to integrate them in this way

Ahmet0691 avatar Apr 07 '24 07:04 Ahmet0691