-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Simplify draft llm #6281
Simplify draft llm #6281
Conversation
de65018
to
8d677c7
Compare
@openhands-agent-exp Read the diff of this PR carefully. We need to document the |
Overview of Changes: ✅ Successfully Resolved:
🔍 Current Status: No remaining issues are apparent from the provided information. |
…/OpenHands into enyst/draft-llm-refactoring
The `draft_editor` configuration is optimized for tasks that involve editing and refining code or text. It uses parameters that balance between creativity and precision, making it ideal for tasks like code review suggestions, documentation improvements, and text refinement. | ||
|
||
```toml | ||
[llm.draft_editor] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this "predefined" in the sense that the user need not specify anything to use this config? I read this as just an example draft editor configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's actually just "predefined name". 🤔 That is, openhands
knows what to do with a configuration with this name, if the user fills it in.
Maybe it's not the best word.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Might help to clarify that the given configuration is an example that would automatically be used as the draft editor LLM if provided.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just like the user can define any other custom configuration like [llm.eval-gpt4o]
etc, and they can use them or not, use them in an agent, or in general, there are some ... maybe we should call them reserved names? [llm.draft_editor]
will be used for the draft llm editor feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Reserved names" makes sense, I think that fits the concept. Implies there's some hard-coded logic around the name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much simpler, I like this approach quite a bit.
Co-authored-by: openhands <[email protected]>
End-user friendly description of the problem this fixes or functionality that this introduces
Users can now define a different LLM as a custom LLM config named with a predefined name:
draft_editor
. To use it for edit drafts, you can, as before, set the agent option to use llm editor (codeact_enable_llm_editor
).Give a summary of what the PR does, explaining any non-trivial design decisions
This PR proposes to simplify the code handling the draft editor LLM:
[llm.draft_editor]
LLMBasedFileEditTool
is only enabled if it's set in the agent,codeact_enable_llm_editor
.Also bug fix:
Note: this was based on top of #4415, the diff will be very simple once that is merged.
To run this PR locally, use the following command: