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

update new model for gpt-4o and gemini-exp #5861

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ export const KnowledgeCutOffDate: Record<string, string> = {
"gpt-4o": "2023-10",
"gpt-4o-2024-05-13": "2023-10",
"gpt-4o-2024-08-06": "2023-10",
"gpt-4o-2024-11-20": "2023-10",
"chatgpt-4o-latest": "2023-10",
"gpt-4o-mini": "2023-10",
"gpt-4o-mini-2024-07-18": "2023-10",
Expand Down Expand Up @@ -303,6 +304,7 @@ const openaiModels = [
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4o-2024-08-06",
"gpt-4o-2024-11-20",
"chatgpt-4o-latest",
"gpt-4o-mini",
"gpt-4o-mini-2024-07-18",
Expand All @@ -318,6 +320,9 @@ const googleModels = [
"gemini-1.0-pro",
"gemini-1.5-pro-latest",
"gemini-1.5-flash-latest",
"gemini-exp-1114",
"gemini-exp-1121",
"learnlm-1.5-pro-experimental",
"gemini-pro-vision",
];

Expand Down
2 changes: 2 additions & 0 deletions app/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ export function isVisionModel(model: string) {
"gpt-4o",
"claude-3",
"gemini-1.5",
"gemini-exp",
"learnlm",
Comment on lines +263 to +264
Copy link
Contributor

Choose a reason for hiding this comment

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

πŸ’‘ Codebase verification

Inconsistency found in model keyword definitions

The implementation shows a mismatch between the model keywords in utils.ts and their actual model names in constant.ts:

  • gemini-exp in utils.ts doesn't match the actual models gemini-exp-1114 and gemini-exp-1121
  • learnlm in utils.ts doesn't match the actual model learnlm-1.5-pro-experimental

This could lead to the isVisionModel function failing to correctly identify these models' vision capabilities.

  • Update the vision keywords in utils.ts to use the complete model names:
    "gemini-exp-1114",
    "gemini-exp-1121",
    "learnlm-1.5-pro-experimental",
πŸ”— Analysis chain

LGTM with a minor query about "learnlm"

The addition of "gemini-exp" aligns with the PR objectives. However, could you provide context about the addition of "learnlm" as it wasn't mentioned in the PR description?

Let's verify if these models are consistently referenced elsewhere in the codebase:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any references to the new model keywords
echo "Searching for gemini-exp references:"
rg "gemini-exp"

echo -e "\nSearching for learnlm references:"
rg "learnlm"

Length of output: 377


Script:

#!/bin/bash
# Let's check the context around these model definitions to understand their usage
echo "Checking context in constant.ts:"
rg -A 5 -B 5 "gemini-exp|learnlm" app/constant.ts

echo -e "\nChecking if these models are used in any configuration or model-specific handling:"
ast-grep --pattern 'if ($_ === "gemini-exp" || $_ === "learnlm") { $$$ }'
ast-grep --pattern 'case "gemini-exp": $$$'
ast-grep --pattern 'case "learnlm": $$$'

Length of output: 725

"qwen-vl",
"qwen2-vl",
];
Expand Down
Loading