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

Improve function call validation with better error handling #6453

Merged
merged 6 commits into from
Jan 27, 2025

Conversation

xingyaoww
Copy link
Collaborator

@xingyaoww xingyaoww commented Jan 24, 2025

This PR improves error handling in the response_to_actions function by:

  1. Adding proper validation for required arguments in each tool call
  2. Using FunctionCallValidationError with informative error messages
  3. Removing special case handling for empty execute_bash command

The changes will help provide better error messages when required arguments are missing, making it easier to debug and fix issues with function calls.


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:9a90439-nikolaik   --name openhands-app-9a90439   docker.all-hands.dev/all-hands-ai/openhands:9a90439

@xingyaoww xingyaoww requested review from rbren and neubig January 24, 2025 22:23
@xingyaoww xingyaoww marked this pull request as ready for review January 27, 2025 18:24
@xingyaoww xingyaoww merged commit 4bde644 into main Jan 27, 2025
14 checks passed
@xingyaoww xingyaoww deleted the improve-function-validation branch January 27, 2025 18:42
zchn pushed a commit to zchn/OpenHands that referenced this pull request Feb 4, 2025
idagelic pushed a commit to idagelic/OpenHands that referenced this pull request Feb 12, 2025
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.

3 participants