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

Keep the first user message by default in condensers #6888

Merged
merged 3 commits into from
Feb 23, 2025

Conversation

enyst
Copy link
Collaborator

@enyst enyst commented Feb 22, 2025

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
    Condensers keep the first user message by default.

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

This PR proposes to set the default keep_first to 1 everywhere in condensers, in a best effort attempt to preserve the first user message. We already did this in one of the condensers, this does it in all.

The limit is configurable and accepts 0, but the use cases for 0 seem maybe eval cases or specific cases, while the first user message is important also because currently, we hook prompt extensions into it.


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

@enyst enyst requested a review from csmith49 February 22, 2025 16:52
@enyst enyst requested a review from rbren February 23, 2025 13:52
Copy link
Collaborator

@csmith49 csmith49 left a comment

Choose a reason for hiding this comment

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

Good changes to default behavior. I'm in the habit of fully providing all config options and not relying on default but hopefully this will save someone some headaches.

@enyst enyst merged commit abac25c into main Feb 23, 2025
14 checks passed
@enyst enyst deleted the enyst/condenser-default-kept branch February 23, 2025 16:20
@enyst enyst mentioned this pull request Feb 24, 2025
1 task
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.

2 participants