-
Notifications
You must be signed in to change notification settings - Fork 60k
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
fix: allow isVisionModel utility function read env var #5982
Conversation
@JiangYingjin is attempting to deploy a commit to the NextChat Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe pull request modifies the Changes
Possibly related PRs
Suggested labels
Poem
Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command π Recent review detailsConfiguration used: CodeRabbit UI π Files selected for processing (2)
π Additional comments (4)test/vision-model-checker.test.ts (2)
app/utils.ts (2)
Run the following shell script to detect potential trailing commas or whitespace issues in environment variables: β Verification successfulString splitting implementation handles edge cases appropriately The code's approach to handling the
π Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# This script searches for environment usage of VISION_MODELS in the project
# to see if there's any code that appends commas or introduces whitespace
rg -A 3 'VISION_MODELS'
Length of output: 2236 Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? πͺ§ TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
π» εζ΄η±»ε | Change Type
π εζ΄θ―΄ζ | Description of Change
Before the fix, the
isVisionModel
function retrievedVISION_MODELS
from thegetClientConfig
function. However, thegetClientConfig
function was unable to readVISION_MODELS
from the runtime environment variables. This issue caused visual models outside the predefined and built-in configurations to be evaluated asfalse
by theisVisionModel
function, resulting in the loss of their visual functionality. Specifically, theVISION_MODELS
environment variable passed by users in Docker did not take effect.After the fix, the
isVisionModel
function can now retrieveVISION_MODELS
not only fromBuildConfig
but also from the runtime environment variables, resolving the issue.π θ‘₯ε δΏ‘ζ― | Additional Information
Accordingly, the test unit
test/vision-model-checker.test.ts
was updated. Custom visual models were passed intoprocess.env.VISION_MODELS
, and the tests were successfully passed.Summary by CodeRabbit
New Features
OpenGVLab/InternVL2-26B
.Bug Fixes
Tests