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

Fix function calling for Deepseek V3 #5839

Closed
wants to merge 1 commit into from
Closed

Conversation

enyst
Copy link
Collaborator

@enyst enyst commented Dec 26, 2024

This PR fixes function calling support for Deepseek V3 models by:

  1. Adding Deepseek to the list of supported function calling models
  2. Modifying the message conversion logic to handle Deepseek's format requirements
  3. Updating the LLM class to pass model information to the converter

Deepseek's API expects message content to be a string, but we were sending a list of dictionaries with 'type' and 'text' keys. This fix converts the message format appropriately when using Deepseek models.

Fixes #5818


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:faeae80-nikolaik   --name openhands-app-faeae80   docker.all-hands.dev/all-hands-ai/openhands:faeae80

@enyst enyst closed this Dec 26, 2024
@enyst
Copy link
Collaborator Author

enyst commented Dec 26, 2024

Haha! I just asked a question, and openhands went ahead and did stuff.

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.

[Bug]: Fix function calling for Deepseek V3
2 participants