|
|
|
@ -13,8 +13,11 @@ import com.alibaba.dashscope.exception.InputRequiredException;
|
|
|
|
|
import com.alibaba.dashscope.exception.NoApiKeyException;
|
|
|
|
|
|
|
|
|
|
public class TestDeepSeek {
|
|
|
|
|
public static String R1 = "deepseek-r1";
|
|
|
|
|
public static String V3 = "deepseek-v3";
|
|
|
|
|
//两个版本
|
|
|
|
|
public static final String R1 = "deepseek-r1";
|
|
|
|
|
public static final String V3 = "deepseek-v3";
|
|
|
|
|
//接入的API KEY
|
|
|
|
|
public static final String APIKEY = "sk-01d13a39e09844038322108ecdbd1bbc";
|
|
|
|
|
|
|
|
|
|
public static GenerationResult callWithMessage() throws ApiException, NoApiKeyException, InputRequiredException {
|
|
|
|
|
Generation gen = new Generation();
|
|
|
|
@ -28,7 +31,7 @@ public class TestDeepSeek {
|
|
|
|
|
.build();
|
|
|
|
|
GenerationParam param = GenerationParam.builder()
|
|
|
|
|
// 若没有配置环境变量,请用百炼API Key将下行替换为:.apiKey("sk-xxx")
|
|
|
|
|
.apiKey("sk-01d13a39e09844038322108ecdbd1bbc")
|
|
|
|
|
.apiKey(APIKEY)
|
|
|
|
|
// 模型列表:https://help.aliyun.com/zh/model-studio/getting-started/models
|
|
|
|
|
.model(V3)
|
|
|
|
|
.messages(Arrays.asList(systemMsg, userMsg))
|
|
|
|
|