-
Notifications
You must be signed in to change notification settings - Fork 700
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
docs: remove model_weak configuration and simplify model selection #1392
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
model="gpt-4o-2024-11-20" | ||
fallback_models=["gpt-4o-2024-08-06"] | ||
#model_weak="gpt-4o-mini-2024-07-18" # optional, a weaker model to use for some easier tasks |
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.
@KennyDizi
some additional adjustments 1:
I want the model_weak to be optional. only if the user actively defines it, it will be used. in general, most users prefer quality over cost reduction
@@ -27,6 +27,12 @@ | |||
from pr_agent.log import get_logger | |||
|
|||
|
|||
def get_weak_model() -> str: |
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.
@KennyDizi
some additional adjustments 2:
fallback to a case where the weak model is not defined
@@ -333,7 +333,7 @@ def generate_full_patch(convert_hunks_to_line_numbers, file_dict, max_tokens_mod | |||
return total_tokens, patches, remaining_files_list_new, files_in_patch_list | |||
|
|||
|
|||
async def retry_with_fallback_models(f: Callable, model_type: ModelType = ModelType.WEAK): | |||
async def retry_with_fallback_models(f: Callable, model_type: ModelType = ModelType.REGULAR): |
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.
some additional adjustments 3:
This is a fix. The default should be REGULAR
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'm wondering because my commit already set the default model to REGULAR
as your suggestion KennyDizi@6352e6e
@KennyDizi if you think additional adjustments are needed, do share. |
Thanks for the heads up @mrT23. This is a good PR to make |
PR Type
enhancement, documentation
Description
model_weak
configuration from the codebase and documentation, simplifying model selection.get_weak_model
to handle weak model retrieval.retry_with_fallback_models
toModelType.REGULAR
.model_weak
and updated configuration examples.Changes walkthrough 📝
pr_processing.py
Simplify model selection and fallback logic
pr_agent/algo/pr_processing.py
get_weak_model
function to import statements.model_type
toModelType.REGULAR
inretry_with_fallback_models
.get_weak_model
.utils.py
Add utility function for weak model retrieval
pr_agent/algo/utils.py
get_weak_model
function to retrieve weak model configuration.changing_a_model.md
Update documentation to remove model_weak configuration
docs/docs/usage-guide/changing_a_model.md
model_weak
configuration.model_weak
.configuration.toml
Comment out model_weak in configuration
pr_agent/settings/configuration.toml
model_weak
configuration.