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

add support for gpt-4-turbo model #854

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

riya-amemiya
Copy link
Contributor

@riya-amemiya riya-amemiya commented Apr 10, 2024

User description

Updated to support the new models added to OpenAI.

CleanShot 2024-04-10 at 14 44 06@2x


Type

enhancement


Description

  • Added support for two new models: gpt-4-turbo-2024-04-09 and gpt-4-turbo, both with a token limit of 128K. This enhances the application's compatibility with the latest models from OpenAI.

Changes walkthrough

Relevant files
Enhancement
__init__.py
Add Support for GPT-4 Turbo Models                                             

pr_agent/algo/init.py

  • Added support for gpt-4-turbo-2024-04-09 model with a token limit of
    128K.
  • Added support for gpt-4-turbo model with a token limit of 128K.
  • +2/-0     

    PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    @codiumai-pr-agent-pro codiumai-pr-agent-pro bot added the enhancement New feature or request label Apr 10, 2024
    Copy link
    Contributor

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    PR Description updated to latest commit (108b1af)

    Copy link
    Contributor

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    PR Review

    ⏱️ Estimated effort to review [1-5]

    1, because the changes are straightforward and involve adding two new model configurations to an existing dictionary of models. The modifications are clear and limited to a single file, making the review process quick and easy.

    🏅 Score

    95

    🧪 Relevant tests

    No

    🔍 Possible issues

    No

    🔒 Security concerns

    No

    🔀 Multiple PR themes

    No


    ✨ Review tool usage guide:

    Overview:
    The review tool scans the PR code changes, and generates a PR review which includes several types of feedbacks, such as possible PR issues, security threats and relevant test in the PR. More feedbacks can be added by configuring the tool.

    The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.

    • When commenting, to edit configurations related to the review tool (pr_reviewer section), use the following template:
    /review --pr_reviewer.some_config1=... --pr_reviewer.some_config2=...
    
    [pr_reviewer]
    some_config1=...
    some_config2=...
    

    See the review usage page for a comprehensive guide on using this tool.

    Copy link
    Contributor

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    PR Code Suggestions

    CategorySuggestions                                                                                                                                                       
    Maintainability
    Use a constant for the token limit value to improve maintainability.

    Consider using a constant for the token limit value (128000) to avoid repetition and to
    make future updates easier. This will improve maintainability, especially if the token
    limit needs to be updated across multiple model configurations.

    pr_agent/algo/init.py [13-15]

    -'gpt-4-turbo-preview': 128000,  # 128K, but may be limited by config.max_model_tokens
    -'gpt-4-turbo-2024-04-09': 128000,  # 128K, but may be limited by config.max_model_tokens
    -'gpt-4-turbo': 128000,  # 128K, but may be limited by config.max_model_tokens
    +MAX_TOKENS = 128000  # 128K, but may be limited by config.max_model_tokens
    +'gpt-4-turbo-preview': MAX_TOKENS,
    +'gpt-4-turbo-2024-04-09': MAX_TOKENS,
    +'gpt-4-turbo': MAX_TOKENS,
     

    ✨ Improve tool usage guide:

    Overview:
    The improve tool scans the PR code changes, and automatically generates suggestions for improving the PR code. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on a PR.

    • When commenting, to edit configurations related to the improve tool (pr_code_suggestions section), use the following template:
    /improve --pr_code_suggestions.some_config1=... --pr_code_suggestions.some_config2=...
    
    [pr_code_suggestions]
    some_config1=...
    some_config2=...
    

    See the improve usage page for a comprehensive guide on using this tool.

    @mrT23
    Copy link
    Collaborator

    mrT23 commented Apr 10, 2024

    @riya-amemiya looks good.

    If the new model (gpt-4-turbo-2024-04-09) will show superior results over the prev one, maybe in time we will consider making it the new default model.

    We might consider also possible usage for the vision mode

    @mrT23 mrT23 merged commit f0c5aec into Codium-ai:main Apr 10, 2024
    1 check passed
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants