This repository was archived by the owner on Jul 4, 2025. It is now read-only.
feat: support pull and load vision model #2061
Merged
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.
Describe Your Changes
This pull request introduces several updates to the handling of model configurations, particularly around the inclusion of a new
mmproj
field. The changes span multiple files and primarily focus on ensuring that themmproj
field is appropriately read, stored, and written in the configuration process.Key changes include:
Model Configuration Updates:
mmproj
field to theModelConfig
structure and ensured it is included when converting to and from JSON. (engine/config/model_config.h
- [1] [2]RemoteModelConfig
structure to ensure consistent formatting. (engine/config/model_config.h
- engine/config/model_config.hL38-R38)YAML Handling Enhancements:
YamlHandler::ReadYamlFile
to add themmproj
file to the YAML configuration if it exists. (engine/config/yaml_config.cc
- engine/config/yaml_config.ccR44-R57)YamlHandler::ModelConfigFromYaml
to read themmproj
field from the YAML configuration. (engine/config/yaml_config.cc
- engine/config/yaml_config.ccR148-R149)YamlHandler::UpdateModelConfig
andYamlHandler::WriteYamlFile
to handle themmproj
field. (engine/config/yaml_config.cc
- [1] [2]Model Service and Controller Adjustments:
Models::StartModel
method to correctly check for the presence of themmproj
field. (engine/controllers/models.cc
- engine/controllers/models.ccL536-R537)ModelService::StartModel
to include themmproj
field in the JSON data if it is not empty. (engine/services/model_service.cc
- engine/services/model_service.ccR953-R961)Fixes Issues
Self Checklist
/v1/chat/completions