-
Notifications
You must be signed in to change notification settings - Fork 60.4k
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
feat: runtime configuration of vision-capable models #5919
Merged
Dogtiti
merged 7 commits into
ChatGPTNextWeb:main
from
Yiming3:feature/flexible-visual-model
Dec 22, 2024
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a433d16
feat: use regex patterns for vision models and allow adding capabilitβ¦
Yiming3 74c4711
Merge remote-tracking branch 'upstream/main' into feature/flexible-viβ¦
Yiming3 ed8c358
test: add unit tests for isVisionModel utility function
Yiming3 210b29b
refactor: remove NEXT_PUBLIC_ prefix from VISION_MODELS env var
Yiming3 149d732
Merge remote-tracking branch 'upstream/main' into feature/flexible-viβ¦
Yiming3 ea1329f
fix: add optional chaining to prevent errors when accessing visionModels
Yiming3 a127ae1
docs: add VISION_MODELS section to README files
Yiming3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
π‘ Codebase verification
Let me generate the final response based on the test results.
Regex Patterns in
VISION_MODEL_REGEXES
Need AdjustmentsThe test results reveal some issues with the regex patterns:
/gpt-4-turbo(?!.*preview)/
pattern is not working as intended in bash regex - it's not matching "gpt-4-turbo" as expected/gemini-1\.5/
pattern works correctly, matching "gemini-1.5-pro"/^dall-e-3$/
pattern works as expected, matching exactly "dall-e-3" but not "dall-e-3-beta"Consider:
^gpt-4-turbo$
to match exactly "gpt-4-turbo"π Analysis chain
Verify Correctness of
VISION_MODEL_REGEXES
PatternsEnsure that each regex in
VISION_MODEL_REGEXES
accurately matches the intended vision models without unintended matches. Pay special attention to:/gemini-1\.5/
: Confirm that the backslash is correctly escaping the dot to matchgemini-1.5
./gpt-4-turbo(?!.*preview)/
: Ensure that this pattern matches"gpt-4-turbo"
but not"gpt-4-turbo-preview"
.Run the following script to test the regex patterns against a list of model names:
π Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 5253