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 finish action #5428

Merged
merged 1 commit into from
Dec 6, 2024
Merged

Fix finish action #5428

merged 1 commit into from
Dec 6, 2024

Conversation

enyst
Copy link
Collaborator

@enyst enyst commented Dec 5, 2024

End-user friendly description of the problem this fixes or functionality that this introduces

  • Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

Give a summary of what the PR does, explaining any non-trivial design decisions

Fix finish action:

  • from the agent. it's a tool call without response (we just execute it)
  • from the user, it doesn't have a tool call id (and we just execute it)
  • fix old actions in history

Link of any specific issues this addresses


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

Fix #4602
Fix #5154

@enyst enyst requested a review from xingyaoww December 5, 2024 21:35
Copy link
Collaborator

@xingyaoww xingyaoww left a comment

Choose a reason for hiding this comment

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

LGTM - one minor question

@@ -177,6 +175,33 @@ def get_action_message(
tool_calls=assistant_msg.tool_calls,
)
return []
elif isinstance(action, AgentFinishAction):
role = 'user' if action.source == 'user' else 'assistant'
Copy link
Collaborator

Choose a reason for hiding this comment

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

else 'agent'?

Copy link
Collaborator Author

@enyst enyst Dec 6, 2024

Choose a reason for hiding this comment

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

It's the role, not the source?

Copy link
Collaborator

Choose a reason for hiding this comment

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

ohhhhhh you are absolutely right! my brain somehow stopped working when it passes 10 pm now ;(

@enyst enyst requested a review from xingyaoww December 6, 2024 03:26
Copy link
Collaborator

@xingyaoww xingyaoww left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the fix!

@enyst enyst merged commit e816231 into main Dec 6, 2024
19 checks passed
@enyst enyst deleted the enyst/finish-action branch December 6, 2024 03:36
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]: FinishTool doesn't have a tool response [Bug]: Tool use breaks on session restore
2 participants