Skip to content

Commit 1a8e18d

Browse files
author
hyz
committed
fix mcp-client config yaml format bug,
fix pom http dependency bug. due to these bugs, mcp-sample can not run success
1 parent a3007d6 commit 1a8e18d

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

spring-ai-mcp/mcp-client/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
<artifactId>httpclient5</artifactId>
2020
<version>5.4.3</version>
2121
</dependency>
22+
<dependency>
23+
<groupId>org.apache.httpcomponents.core5</groupId>
24+
<artifactId>httpcore5</artifactId>
25+
<version>5.3.4</version> <!-- 确保版本兼容 -->
26+
</dependency>
2227

2328
<dependency>
2429
<groupId>org.springframework.ai</groupId>

spring-ai-mcp/mcp-client/src/main/resources/application.yaml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ spring:
66
name: mcp-client
77
profiles:
88
active: mcp-client
9-
ai:
10-
openai:
11-
api-key: sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
12-
chat:
13-
base-url: https://api.deepseek.com
14-
completions-path: /v1/chat/completions
15-
options:
16-
model: deepseek-chat
9+
ai:
10+
openai:
11+
api-key: ${spring.ai.openai.api-key}
12+
chat:
13+
# base-url: https://api.deepseek.com
14+
base-url: https://dashscope.aliyuncs.com/compatible-mode
15+
# completions-path: /v1/chat/completions
16+
completions-path: /v1/chat/completions
17+
options:
18+
# model: deepseek-chat
19+
model: qwen-plus

0 commit comments

Comments
 (0)