feat:【ai 大模型】增加 MCP Server Client Starter 示例

This commit is contained in:
YunaiV
2025-08-27 23:54:27 +08:00
parent 5b31f27bd5
commit 369ca68a35
3 changed files with 16 additions and 1 deletions

View File

@@ -193,6 +193,12 @@
<version>${spring-ai.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-starter-mcp-client-webflux</artifactId>
<version>${spring-ai.version}</version>
</dependency>
<!-- TinyFlowAI 工作流 -->
<dependency>
<groupId>dev.tinyflow</groupId>

View File

@@ -346,7 +346,8 @@ public class AiChatMessageServiceImpl implements AiChatMessageService {
// 2.2 构建 ChatOptions 对象
AiPlatformEnum platform = AiPlatformEnum.validatePlatform(model.getPlatform());
ChatOptions chatOptions = AiUtils.buildChatOptions(platform, model.getModel(),
conversation.getTemperature(), conversation.getMaxTokens(), toolNames, toolContext);
conversation.getTemperature(), conversation.getMaxTokens(),
toolNames, toolContext);
return new Prompt(chatMessages, chatOptions);
}