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

[Bug]: Disable function calling for DeepSeek #4604

Open
1 task done
enyst opened this issue Oct 29, 2024 · 3 comments
Open
1 task done

[Bug]: Disable function calling for DeepSeek #4604

enyst opened this issue Oct 29, 2024 · 3 comments
Labels
bug Something isn't working fix-me Attempt to fix this issue with OpenHands.

Comments

@enyst
Copy link
Collaborator

enyst commented Oct 29, 2024

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Describe the bug and reproduction steps

Trying to run on the current main with UI. I started a new "project" in the UI. Then I wrote "print 55":

10:13:33 - openhands:DEBUG: stream.py:144 - Adding ErrorObservation id=10 from USER
10:13:33 - openhands:DEBUG: stream.py:144 - Adding AgentStateChangedObservation id=11 from AGENT
10:13:33 - openhands:DEBUG: agent_controller.py:135
OBSERVATION
[Agent Controller dfcf323b-009e-4e0d-af91-126f1fe9ca4f] **ErrorObservation**
There was an unexpected error while running the agent:litellm.BadRequestError: DeepseekException - Failed to deserialize the JSON body into the target type: messages[2]: invalid type: sequence, expected a string at line 1 column 683

DeepSeek supports tool use, but I'm not sure we tested with DeepSeek? We really need that CI eval PR. 😅

Note:

  • the first prompt to the LLM was:
You are a helpful assistant that can interact with a computer to solve tasks.
<IMPORTANT>
* If user provides a path, you should NOT assume it's relative to the current working directory. Instead, you should explore the file system to find the file before working on it.
</IMPORTANT>


----------

print 55
  • the second prompt was:
You are a helpful assistant that can interact with a computer to solve tasks.
<IMPORTANT>
* If user provides a path, you should NOT assume it's relative to the current working directory. Instead, you should explore the file system to find the file before working on it.
</IMPORTANT>


----------

print 55

----------



----------

OBSERVATION:
echo 55
55[Python Interpreter: /openhands/poetry/openhands-ai-5O4_aCHf-py3.12/bin/python]
openhands@openhands-workspace:/workspace $ 
[Command finished with exit code 0]

OpenHands Installation

Development workflow

OpenHands Version

No response

Operating System

None

Logs, Errors, Screenshots, and Additional Context

No response

@enyst enyst added the bug Something isn't working label Oct 29, 2024
@enyst enyst changed the title [Bug]: [Tool use] BadRequestError on messages to DeepSeek [Bug]: Disable tool use for DeepSeek Oct 29, 2024
@enyst
Copy link
Collaborator Author

enyst commented Oct 29, 2024

We need to disable function calling for DeepSeek.

Function calling is enabled or disabled in the openhands/agenthub/codeact_agent/codeact_agent.py file.

We can define some module global to disable it for any models with 'deepseek'.

@enyst enyst changed the title [Bug]: Disable tool use for DeepSeek [Bug]: Disable function calling for DeepSeek Oct 29, 2024
@enyst enyst added the fix-me Attempt to fix this issue with OpenHands. label Oct 29, 2024
Copy link
Contributor

OpenHands started fixing the issue! You can monitor the progress here.

Copy link
Contributor

An attempt was made to automatically fix this issue, but it was unsuccessful. A branch named 'openhands-fix-issue-4604' has been created with the attempted changes. You can view the branch here. Manual intervention may be required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix-me Attempt to fix this issue with OpenHands.
Projects
None yet
Development

No branches or pull requests

1 participant