-
Notifications
You must be signed in to change notification settings - Fork 59.9k
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
feature: support glm-4v #5997
feature: support glm-4v #5997
Conversation
The latest updates on your projects. Learn more about Vercel for Git βοΈ
|
Caution Review failedThe pull request is closed. WalkthroughThe pull request introduces enhancements to the GLM (Generative Language Model) platform support in the application. The changes focus on improving vision model handling by adding new model recognition and updating content processing logic. Specifically, the modifications enable better support for vision-capable models like GLM-4V series by introducing new model regex patterns and updating the chat method to conditionally process image content based on the model type. Changes
Sequence DiagramsequenceDiagram
participant Client
participant ChatGLMApi
participant ModelProcessor
Client->>ChatGLMApi: chat(options)
ChatGLMApi->>ModelProcessor: isVisionModel(model)
alt Is Vision Model
ModelProcessor-->>ChatGLMApi: true
ChatGLMApi->>ModelProcessor: preProcessImageContent(message)
else Is Text Model
ModelProcessor-->>ChatGLMApi: false
ChatGLMApi->>ModelProcessor: getMessageTextContent(message)
end
ChatGLMApi-->>Client: Processed Chat Response
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)
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
π θ‘₯ε δΏ‘ζ― | Additional Information
Summary by CodeRabbit
New Features
Improvements