✨ feat: 允许用户自行定义 Embedding 模型 #4370
Open
+393
−86
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.
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
本次变更主要实现了embedding 模型可配置性
通过新增环境变量DEFAULT_FILES_CONFIG实现可自主配置embedding 模型, provider基于现有模型供应商列表
示例:
以 / 为分隔符 openai 为模型提供商, text-embedding-3-small为 embedding 模型
📝 补充信息 | Additional Information
目前已支持 zhipu/github/openai/bedrock/ollama模型提供商的embedding 模型
可在agent-runtime下对各模型提供商实现 embeddings 方法从而增加 embedding 模型支持
为后续检索策略预留 rerank 模型以及查询模式变量入口