mirror of
https://gitcode.com/ageerle/ruoyi-ai.git
synced 2026-04-16 05:13:41 +00:00
context:根据模型分类找到实现类修改为由模型供应商找到实现类(保持工作流和对话流程一致)
This commit is contained in:
@@ -118,10 +118,10 @@ public class WorkflowUtil {
|
|||||||
throw new IllegalArgumentException("模型不存在: " + modelName);
|
throw new IllegalArgumentException("模型不存在: " + modelName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据模型名称找到模型实体
|
// 路由服务提供商
|
||||||
String modelVoCategory = chatModelVo.getCategory();
|
String category = chatModelVo.getProviderCode();
|
||||||
// 根据 category 获取对应的 ChatService(不使用计费代理,工作流场景单独计费)
|
// 根据 category 获取对应的 ChatService(不使用计费代理,工作流场景单独计费)
|
||||||
IChatService chatService = chatServiceFactory.getOriginalService(modelVoCategory);
|
IChatService chatService = chatServiceFactory.getOriginalService(category);
|
||||||
|
|
||||||
StreamingChatGenerator<AgentState> streamingGenerator = StreamingChatGenerator.builder()
|
StreamingChatGenerator<AgentState> streamingGenerator = StreamingChatGenerator.builder()
|
||||||
.mapResult(response -> {
|
.mapResult(response -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user