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

Switch primary model to GPT-4 Turbo Preview with GPT-4 as fallback #435

Closed
wants to merge 3 commits into from
Closed

Switch primary model to GPT-4 Turbo Preview with GPT-4 as fallback #435

wants to merge 3 commits into from

Conversation

KennyDizi
Copy link
Contributor

@KennyDizi KennyDizi commented Nov 7, 2023

PR Type:

Enhancement


PR Description:

This PR updates the primary model used by the application to "gpt-4-1106-preview" and sets "gpt-4" as the fallback model. The changes are made in the configuration file.


PR Main Files Walkthrough:

files:
  • pr_agent/settings/configuration.toml: The primary model has been changed from 'gpt-4' to 'gpt-4-1106-preview'. The fallback model has been updated from 'gpt-3.5-turbo-16k' to 'gpt-4'.

@KennyDizi KennyDizi changed the title Use GPT-4 turbo preview as the first model, GPT-4 as fallback model Switch primary model to GPT-4 Turbo Preview with GPT-4 as fallback Nov 7, 2023
…turbo model is 3x and 2x cheaper respectively compared to the previous GPT-4 pricing
git_provider="github"
publish_output=true
publish_output_progress=true
verbosity_level=0 # 0,1,2
use_extra_bad_extensions=false
use_repo_settings_file=true
ai_timeout=180
max_description_tokens = 500
max_commits_tokens = 500
max_description_tokens = 1000
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Increase max_description_tokens and max_commits_tokens because gpt-4 turbo model is 3x and 2x cheaper respectively compared to the previous GPT-4 pricing.

@mrT23
Copy link
Collaborator

mrT23 commented Nov 7, 2023

@KennyDizi We won't switch primary default model that quickly, needs more testing and feedback from the community

It is a good idea to add support for this new model. You need to edit properly:
pr-agent/pr_agent/algo/__init__.py
I don't recommend allowing the maximum context (128K). From my experience, performance go way way down with very large context. i would cap it to 16K

@mrT23
Copy link
Collaborator

mrT23 commented Nov 7, 2023

and for the primary model, set:
model="gpt-4" # "gpt-4-1106-preview"

@KennyDizi
Copy link
Contributor Author

@KennyDizi We won't switch primary default model that quickly, needs more testing and feedback from the community

It is a good idea to add support for this new model. You need to edit properly: pr-agent/pr_agent/algo/__init__.py I don't recommend allowing the maximum context (128K). From my experience, performance go way way down with very large context. i would cap it to 16K

@mrT23 sure I've added support for gpt-4-1106-preview model

@KennyDizi
Copy link
Contributor Author

@mrT23 let's keep this PR like this and wait for model update as well as feedback from community.

@KennyDizi
Copy link
Contributor Author

Tested with model gpt-4-1106-preview, it's much faster than gpt-4

@mrT23 mrT23 added invalid This doesn't seem right and removed invalid This doesn't seem right labels Nov 7, 2023
@mrT23
Copy link
Collaborator

mrT23 commented Nov 7, 2023

gpt-3.5 is faster than both. Quality needs to be thoroughly tested to ensure a positive tradeoff when changing the default model.

Support for the new model will be added here:
#437
You are welcome to use it in your repo, and share feedback and comparison regarding the quality

@mrT23 mrT23 closed this Nov 7, 2023
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