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

Strange created filenames. #566

Open
kgott opened this issue May 17, 2024 · 6 comments · May be fixed by #567
Open

Strange created filenames. #566

kgott opened this issue May 17, 2024 · 6 comments · May be fixed by #567

Comments

@kgott
Copy link
Contributor

kgott commented May 17, 2024

I am using devika on an ubuntu 22.04 LTS machine with a local running ollama with various models.
In principle it is creating files, but the file names are strange like:
tom@tomHome test2 $ ls
'main.py'
Where can I fix that, so the filename would be main.py?

Originally posted by @tblock-zz in #564

kgott added a commit to kgott/devika that referenced this issue May 17, 2024
@kgott kgott linked a pull request May 17, 2024 that will close this issue
@dagelf
Copy link

dagelf commented May 26, 2024

Works great with the models I've tried.

@steinhaug
Copy link

I can confirm that the ticks are being created on my windows install.

Files created in one of the projects folders:

`main.py`
`requirements.txt`

My setup: Windows 10, Python 3.11.12, running 4a62feb

@darrassi1
Copy link
Contributor

Just replace this line in. Validate response function of coder agent
current_file = line.split(":")[1].strip()
To
current_file = line.split("`")[1].strip()

@GaryCooper23
Copy link

In

Just replace this line in. Validate response function of coder agent current_file = line.split(":")[1].strip() To current_file = line.split("`")[1].strip()

In which file? I have the same Problem.

@GaryCooper23
Copy link

Found it under "devika\src\agents\coder\coder.py"

@kgott
Copy link
Contributor Author

kgott commented Jun 3, 2024

Hi all, I already made a fix for this on PR #567 over 2 weeks ago:

current_file = line.split(":")[1].replace("`", "").strip()

We can't just change it back to split on the backtick, as I've seen it where the backticks are not always generated, so it would kick an "index out of range" error. So my solution was to keep the split on the colon, but replace the backticks with empty spaces. Can someone approve PR #567?

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

Successfully merging a pull request may close this issue.

5 participants