Commit 1f4a3464 by zhangxingmin

push

parent 68dd03d6
...@@ -75,13 +75,13 @@ public class ApiAiStreamServiceImpl implements ApiAiStreamService { ...@@ -75,13 +75,13 @@ public class ApiAiStreamServiceImpl implements ApiAiStreamService {
throw e; throw e;
} }
// 正常调用大模型流式接口(使用 Qwen3.6-Plus 模型) // 正常调用大模型流式接口(使用 Qwen3-Max 模型)
Generation gen = new Generation(); Generation gen = new Generation();
Message systemMsg = Message.builder().role(Role.SYSTEM.getValue()).content("You are a helpful assistant.").build(); Message systemMsg = Message.builder().role(Role.SYSTEM.getValue()).content("You are a helpful assistant.").build();
Message userMsg = Message.builder().role(Role.USER.getValue()).content(question).build(); Message userMsg = Message.builder().role(Role.USER.getValue()).content(question).build();
GenerationParam param = GenerationParam.builder() GenerationParam param = GenerationParam.builder()
.apiKey("sk-d6551c67cfbe4a759a78dc3625729291") // 请使用安全的密钥管理方式 .apiKey("sk-d6551c67cfbe4a759a78dc3625729291") // 请使用安全的密钥管理方式
.model("qwen3.6-plus") // 模型改为 qwen3.6-plus .model("qwen3-max") // 模型改为 qwen3-max(千问3旗舰版)
.messages(Arrays.asList(systemMsg, userMsg)) .messages(Arrays.asList(systemMsg, userMsg))
.resultFormat(GenerationParam.ResultFormat.MESSAGE) .resultFormat(GenerationParam.ResultFormat.MESSAGE)
.incrementalOutput(true) .incrementalOutput(true)
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>dashscope-sdk-java</artifactId> <artifactId>dashscope-sdk-java</artifactId>
<version>2.22.14</version> <version>2.22.15</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment