feat: 新增向量嵌入服务支持
新增SiliconFlow向量嵌入服务实现,支持文本向量化功能: - 新增ITextEmbeddingService接口和SiliconFlowTextEmbeddingService实现 - 新增EmbeddingCreateRequest/Response等向量相关DTO - 在AiGateWayManager中新增EmbeddingForStatisticsAsync方法 - 在OpenApiService中新增向量生成API接口 - 扩展ModelTypeEnum枚举支持Embedding类型 - 优化ThorChatMessage的Content属性处理逻辑
This commit is contained in:
@@ -7,6 +7,7 @@ using Yi.Framework.AiHub.Domain.AiGateWay.Impl.ThorAzureDatabricks.Chats;
|
||||
using Yi.Framework.AiHub.Domain.AiGateWay.Impl.ThorAzureOpenAI.Chats;
|
||||
using Yi.Framework.AiHub.Domain.AiGateWay.Impl.ThorAzureOpenAI.Images;
|
||||
using Yi.Framework.AiHub.Domain.AiGateWay.Impl.ThorDeepSeek.Chats;
|
||||
using Yi.Framework.AiHub.Domain.AiGateWay.Impl.ThorSiliconFlow.Embeddings;
|
||||
using Yi.Framework.AiHub.Domain.Shared;
|
||||
using Yi.Framework.Mapster;
|
||||
|
||||
@@ -35,6 +36,8 @@ namespace Yi.Framework.AiHub.Domain
|
||||
services.AddKeyedTransient<IImageService, AzureOpenAIServiceImageService>(
|
||||
nameof(AzureOpenAIServiceImageService));
|
||||
|
||||
|
||||
services.AddKeyedTransient<ITextEmbeddingService, SiliconFlowTextEmbeddingService>(nameof(SiliconFlowTextEmbeddingService));
|
||||
|
||||
//ai模型特殊性兼容处理
|
||||
Configure<SpecialCompatibleOptions>(options =>
|
||||
|
||||
Reference in New Issue
Block a user