feat:【ai 大模型】增加 MCP Server Client Starter 示例
This commit is contained in:
@@ -193,6 +193,12 @@
|
|||||||
<version>${spring-ai.version}</version>
|
<version>${spring-ai.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.ai</groupId>
|
||||||
|
<artifactId>spring-ai-starter-mcp-client-webflux</artifactId>
|
||||||
|
<version>${spring-ai.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- TinyFlow:AI 工作流 -->
|
<!-- TinyFlow:AI 工作流 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>dev.tinyflow</groupId>
|
<groupId>dev.tinyflow</groupId>
|
||||||
|
|||||||
@@ -346,7 +346,8 @@ public class AiChatMessageServiceImpl implements AiChatMessageService {
|
|||||||
// 2.2 构建 ChatOptions 对象
|
// 2.2 构建 ChatOptions 对象
|
||||||
AiPlatformEnum platform = AiPlatformEnum.validatePlatform(model.getPlatform());
|
AiPlatformEnum platform = AiPlatformEnum.validatePlatform(model.getPlatform());
|
||||||
ChatOptions chatOptions = AiUtils.buildChatOptions(platform, model.getModel(),
|
ChatOptions chatOptions = AiUtils.buildChatOptions(platform, model.getModel(),
|
||||||
conversation.getTemperature(), conversation.getMaxTokens(), toolNames, toolContext);
|
conversation.getTemperature(), conversation.getMaxTokens(),
|
||||||
|
toolNames, toolContext);
|
||||||
return new Prompt(chatMessages, chatOptions);
|
return new Prompt(chatMessages, chatOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -203,6 +203,14 @@ spring:
|
|||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
instructions: 一个 MCP 示例服务
|
instructions: 一个 MCP 示例服务
|
||||||
sse-endpoint: /sse
|
sse-endpoint: /sse
|
||||||
|
client:
|
||||||
|
enabled: true
|
||||||
|
name: mcp
|
||||||
|
sse:
|
||||||
|
connections:
|
||||||
|
filesystem:
|
||||||
|
url: http://127.0.0.1:8089
|
||||||
|
sse-endpoint: /sse
|
||||||
|
|
||||||
yudao:
|
yudao:
|
||||||
ai:
|
ai:
|
||||||
|
|||||||
Reference in New Issue
Block a user