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

gptme often tries to use python instead of ipython to execute python code #327

Open
Miyou opened this issue Dec 12, 2024 · 6 comments
Open

Comments

@Miyou
Copy link

Miyou commented Dec 12, 2024

I feel like this could be solved by adding some extra prompting around this

@Miyou Miyou changed the title gptme often tries to use python instead of ipython to execute python code gptme often tries to use \python instead of \ipython to execute python code Dec 12, 2024
@Miyou Miyou changed the title gptme often tries to use \python instead of \ipython to execute python code gptme often tries to use \\\python instead of \\\ipython to execute python code Dec 12, 2024
@Miyou Miyou changed the title gptme often tries to use \\\python instead of \\\ipython to execute python code gptme often tries to use python instead of ````ipython to execute python code Dec 12, 2024
@Miyou Miyou changed the title gptme often tries to use python instead of ````ipython to execute python code gptme often tries to use python instead of ipython to execute python code Dec 12, 2024
@Miyou Miyou changed the title gptme often tries to use python instead of ipython to execute python code gptme often tries to use \python instead of \ipython to execute python code Dec 12, 2024
@Miyou Miyou changed the title gptme often tries to use \python instead of \ipython to execute python code gptme often tries to use python instead of ipython to execute python code Dec 12, 2024
@Miyou Miyou changed the title gptme often tries to use python instead of ipython to execute python code gptme often tries to use python instead of ipython to execute python code Dec 12, 2024
@Miyou Miyou changed the title gptme often tries to use python instead of ipython to execute python code gptme often tries to use python instead of ipython to execute python code Dec 12, 2024
@ErikBjare
Copy link
Owner

ErikBjare commented Dec 12, 2024

We used to just use ```python and ```bash for python and shell tool, but had to change it since it kept trying/asking to run non-runnable code snippets/examples it showed using the same markup. I later changed it to just ipython/shell respectively, and it works much better, but it sometimes messes it up still. Tried different prompts, but hard to measure what has impact since it's somewhat rare/random.

See #67 for backstory

@Miyou
Copy link
Author

Miyou commented Dec 13, 2024

We used to just use python and bash for python and shell tool, but had to change it since it kept trying/asking to run non-runnable code snippets/examples it showed using the same markup. I later changed it to just ipython/shell respectively, and it works much better, but it sometimes messes it up still. Tried different prompts, but hard to measure what has impact since it's somewhat rare/random.

See #67 for backstory

Perhaps not using ``` for tool execution could be a solution. Maybe use XML tags instead?

@ErikBjare
Copy link
Owner

ErikBjare commented Dec 13, 2024

@Miyou you can try that with the --tool-format xml parameter

@bjsi
Copy link
Contributor

bjsi commented Dec 17, 2024

Maybe changing the name of the tool from python -> ipython?

@ErikBjare
Copy link
Owner

@bjsi Yeah I think that might help, could eval some small model which struggles and see if it helps.

@ErikBjare
Copy link
Owner

@Miyou Try using latest gptme master with --tool-format tool now that we merged #306

Since it skips the markdown format altogether, it shouldn't suffer from this issue.

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

3 participants