[Bug]: In-context example does not match tool specification
Is there an existing issue for the same bug? (If one exists, thumbs up or comment on the issue instead).
- [x] I have checked the existing issues.
Describe the bug and reproduction steps
The finish tool in codeact_agent requires two parameters ['message', 'task_completed'], but the in context example here does not include these two parameters.
Maybe the in context example here should be changed to:
ASSISTANT:
<function=finish>
<parameter=message>
The server is running on port 5000 with PID 126. You can access the list of numbers in a table format by visiting http://127.0.0.1:5000. Let me know if you have any further requests!
</parameter>
<parameter=task_completed>true</parameter>
</function>
OpenHands Installation
Docker command in README
OpenHands Version
No response
Operating System
None
Logs, Errors, Screenshots, and Additional Context
No response
@openhands please fix this
I'm on it! neubig can track my progress at all-hands.dev
I successfully fixed issue #8476 in the OpenHands repository. Here's a summary of what I did:
-
Issue Analysis: The issue was that the in-context example for the
finishtool infn_call_converter.pywas missing the required parameters (messageandtask_completed) that are specified in the tool's definition infinish.py. -
Fix Implementation: I updated the in-context example in
fn_call_converter.pyto include both required parameters:- Added the
messageparameter containing the text that was previously outside the function call - Added the
task_completedparameter with value "true"
- Added the
-
Testing: I ran the unit tests for the function call converter, which all passed, confirming that my changes didn't break any existing functionality.
-
Code Quality: I ran the pre-commit hooks to ensure my changes met the code quality standards of the project.
-
Pull Request: I created a new branch
openhands/fix-finish-tool-example, committed my changes, and opened PR #8487 that fixes issue #8476.
The PR is now available at: https://github.com/All-Hands-AI/OpenHands/pull/8487
This change ensures that the in-context example correctly demonstrates how to use the finish tool with all its required parameters, which will help prevent confusion for developers and ensure proper function calling behavior.
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for over 30 days with no activity.