-
Notifications
You must be signed in to change notification settings - Fork 652
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
Abstract AiHandler to BaseAiHandler #514
Conversation
/review |
PR Analysis(review updated until commit e37598f)
PR Feedback
How to useInstructions
|
/update_changelog |
Changelog updates: 2023-12-09Changed
|
/generate_labels |
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.
LGTM
/review |
Persistent review updated to latest commit b640992 |
/auto_review |
Persistent review updated to latest commit b640992 |
Hi @brianpham93
As a side note, in contrast to the PR description, the current handler does not directly access the LLM provider ("In many organization, accessing directly to LLM provider is not permit") - it uses LiteLLM interface wrapper |
thanks @mrT23 . i'll improve this PR further |
Persistent review updated to latest commit b640992 |
1 similar comment
Persistent review updated to latest commit b640992 |
method This commit refactors the PRAgent class and the has_ai_handler_param method. The has_ai_handler_param method is moved outside the class and made a standalone function. This change improves code organization and readability. The has_ai_handler_param function now takes a class object as a parameter and checks if the class constructor has an "ai_handler" parameter. This refactoring is done to streamline the code and improve its maintainability. No issue references.
/review |
/update_changelog |
Changelog updates: 2023-12-13Changed
Added
|
Persistent review updated to latest commit e37598f |
…fy AI handler injection in PRAgent
…hub_action_runner.py
Hi @brianpham93 , good work. I hade some issues with the structure and where to give the default values. In general, I don't recommend initializing things on the main path I made some corrections, simplifications and protections, nothing that changes the behavior. Please merge this PR to yours: I did move the 'LangChainOpenAIHandler' to be optional, since this is quite an heavy installation, and currently I don't see an advantage it has over plain OpenAIHandler. if you think otherwise, let me know after you merge my PR to yours, we can merge to main |
thank @mrT23 , i've merged your PR's changes to my branch |
great work @brianpham93 |
Abstract AiHandler to BaseAiHandler
In many organization, accessing directly to LLM provider is not permit. By abstracting implementation of AiHandler to an interface, this allows developer to have more freedom in customizing how each function could work with organization's own way of integrating with LLM