-
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
修复 VISION_MDOELS 在 docker 运行阶段不生效的问题 #6010
Conversation
@code-october 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 introduces a new configuration option for vision models across multiple files. The changes involve adding a Changes
Sequence DiagramsequenceDiagram
participant Env as Environment
participant Server as ServerConfig
participant Store as AccessStore
participant Util as Utility Functions
Env->>Server: Set VISION_MODELS
Server->>Store: Initialize visionModels
Store->>Util: Provide visionModels for checking
Util->>Util: Validate vision model availability
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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 (
|
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.
Actionable comments posted: 1
🧹 Nitpick comments (2)
app/store/access.ts (1)
134-134
: Consider storing vision models as a typed array or similar structure
Storing models as a comma-separated string is acceptable, but handling them as an actual array might improve maintainability and reduce parsing overhead.app/utils.ts (1)
258-259
: Check for empty or invalid comma-separated strings.
Splitting thevisionModels
string is fine, but consider handling edge cases like extra commas or spaces.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
app/api/config/route.ts
(1 hunks)app/config/build.ts
(0 hunks)app/config/server.ts
(3 hunks)app/store/access.ts
(2 hunks)app/utils.ts
(2 hunks)
💤 Files with no reviewable changes (1)
- app/config/build.ts
🔇 Additional comments (5)
app/api/config/route.ts (1)
17-17
: Adding the visionModels
property looks good.
No issues identified. The property aligns with the server configuration for vision models.
app/config/server.ts (3)
26-26
: Definition of the new VISION_MODELS
variable looks correct.
The optional property is properly declared in the ProcessEnv
interface.
132-132
: Defaulting VISION_MODELS
to an empty string is practical.
Ensures that the application has a fallback if the environment variable is not set.
254-254
: Including visionModels
in the returned configuration is correct.
No issues identified. This ensures the server config passes the new property downstream.
app/utils.ts (1)
9-9
: New import of useAccessStore
is appropriate.
This aligns with the store-based approach for retrieving configuration.
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
解决问题:#6007
原方法 VISION_MDOELS 只在构建过程生效,无法在 docker 运行时起作用
(另一个环境变量 DEFAULT_INPUT_TEMPLATE 同理,这里暂不做修改)
📝 补充信息 | Additional Information
Summary by CodeRabbit
Release Notes
New Features
Configuration Updates
Technical Improvements