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

feat: deepseek r1 alternative tool calling format #975

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

michaelneale
Copy link
Collaborator

deepseek can be used (in many ways) from openrouter, so I am trying the largest ones with this.
I found that I can replace the tool calls with a system prompt and it works... a lot of the time. If this continues, could be a more general approach for models which don't support tool calling (use type of format).

cc @ahau-square for the idea

@michaelneale michaelneale changed the title experimental: deepseek r1 openrouter format feat: deepseek r1 alternative tool calling format Jan 31, 2025
.and_then(|obj| obj.get_mut("messages"))
.and_then(|messages| messages.as_array_mut())
{
// Add "cache_control" to the last and second-to-last "user" messages

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cache_control is just for anthropic models

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 this pull request may close these issues.

2 participants