-
Notifications
You must be signed in to change notification settings - Fork 7k
Fix issue #8419: Document get_impl
and import_from
#8420
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
Conversation
@openhands-agent-exp Read and understand this PR and linked issue. The current documentation has two problems:
|
Based on the provided information, here's a concise overview: ✅ Successfully Resolved:
🔍 No Issues Remaining: Recommendation: |
2. Implementing all required methods | ||
3. Setting server_config.github_service_class to the fully qualified name of the class | ||
|
||
The class is instantiated via get_impl() in openhands.server.shared.py. |
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.
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.
Thanks for doing this!
Looks like there are a few issues preventing this PR from being merged!
If you'd like me to help, just leave a comment, like
Feel free to include any additional details that might help me get this PR into a better state. You can manage your notification settings |
The get_impl function is one of the extensibility mechanisms in the project. It allows applications built on openhands to customize behavior by redefining and substituting at runtime their own implementations of the classes that this function is used for.
The LLMs get confused by the current code, for example here. I also had a confused agent recently.
This PR proposes to add some clarification, specially docstrings, to make it easier to understand. It was primarily meant for LLMs, but humans can benefit too from clarity and consistency. 😄
This pull request fixes #8419.
The issue has been successfully resolved based on the following concrete changes and their impact:
get_impl
andimport_from
functions inimport_utils.py
, clearly explaining their purpose, usage, and type safety guaranteesConversationManager
andStandaloneConversationManager
classes that use the extensibility mechanismREADME.md
in the utils directory that provides a complete explanation of the runtime implementation substitution systemThe changes provide a clear, comprehensive, and properly placed documentation of the extensibility mechanism, making it easy for developers to understand and implement custom behaviors in OpenHands.
Automatic fix generated by OpenHands 🙌
To run this PR locally, use the following command: