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

Limit tool call id to 9 chars for Mistral #279

Merged
merged 3 commits into from
Jul 28, 2024
Merged

Conversation

jackmpcollins
Copy link
Owner

Limit tool call id to 9 chars for Mistral.

Fixes #276
Closes #277

@jackmpcollins jackmpcollins self-assigned this Jul 28, 2024
Comment on lines +116 to +118
# Mistral requires AssistantMessage after tool output
# TODO: Automatically add this in ChatModel.complete like for tool calls
AssistantMessage("."),
Copy link
Owner Author

Choose a reason for hiding this comment

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

@mnicstruwig FYI, should only be needed if doing few-shot prompting.

The OpenAI and Mistral APIs are starting to diverge so I've made an issue to switch to using the Mistral python client. #280

@jackmpcollins jackmpcollins merged commit 0faaeea into main Jul 28, 2024
2 checks passed
@jackmpcollins jackmpcollins deleted the fix-mistral-tool-id branch July 28, 2024 23:11
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.

Mistral function calling uses invalid tool_id length
1 participant