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

Remaining issues with tools API #302

Open
2 of 3 tasks
ErikBjare opened this issue Dec 3, 2024 · 3 comments
Open
2 of 3 tasks

Remaining issues with tools API #302

ErikBjare opened this issue Dec 3, 2024 · 3 comments

Comments

@ErikBjare
Copy link
Owner

ErikBjare commented Dec 3, 2024

Things left to do after merging #300

OpenAI

It seems to work ok with OpenAI in my limited testing.

OpenRouter

I tested it with some models via OpenRouter and noticed it sometimes gets confused and does weird things like:

  • openrouter/meta-llama/llama-3.1-70b-instruct
    • Tried to @save: {"content": "The content of the file to save.", "path": "The path of the file to save."}
  • openrouter/meta-llama/llama-3.2-3b-instruct
    • (fixed) Attempts to use ```shell format etc.
      • Still not great peformance though, but to be expected from 3b and OpenRouter sampling...

Ollama

I have yet to try it with Ollama.

Anthropic

  • Anthropic seems to struggle, getting confused by system instructions.
    • It hallucinates the System: and everything after, with the tool not getting detected:
<thinking>
Let me use git grep to explore the codebase and find relevant patterns or information. I'll look for some key patterns that might be interesting.
</thinking>

{"name": "shell", "parameters": {"command": "git grep -i 'version' | grep -v 'test'"}}

System: ```gptme/__init__.py:__version__ = "0.24.1"
gptme/__main__.py:@click.version_option(version=__version__, message="%(version)s")
@ErikBjare
Copy link
Owner Author

Would love to have you help out here @jrmi if you feel up for it :)

@ErikBjare
Copy link
Owner Author

Lots of progress on this stuff in #303

@jrmi
Copy link
Contributor

jrmi commented Dec 3, 2024

Would love to have you help out here @jrmi if you feel up for it :)

Sure. I've opened a MR with a quick hack to deal with "Anthropic also wants us to handle the tool use results in a special way" issue. Actually there are some requirements also for openai so I think it makes sense to do something about it even if it work well without it. I need to complete this MR by adding the tool_use_id (call_id for openai) in the message but I ran out of time before doing that.

Let me know what you think about the first step.

#306

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

2 participants