context:根据模型分类找到实现类修改为由模型供应商找到实现类(保持工作流和对话流程一致)

This commit is contained in:
zengxb
2026-02-24 10:58:11 +08:00
parent 0a115f289e
commit d6e4a50d6e

View File

@@ -118,10 +118,10 @@ public class WorkflowUtil {
throw new IllegalArgumentException("模型不存在: " + modelName);
}
// 根据模型名称找到模型实体
String modelVoCategory = chatModelVo.getCategory();
// 路由服务提供商
String category = chatModelVo.getProviderCode();
// 根据 category 获取对应的 ChatService不使用计费代理工作流场景单独计费
IChatService chatService = chatServiceFactory.getOriginalService(modelVoCategory);
IChatService chatService = chatServiceFactory.getOriginalService(category);
StreamingChatGenerator<AgentState> streamingGenerator = StreamingChatGenerator.builder()
.mapResult(response -> {