add ai chat deepseek
This commit is contained in:
@@ -51,6 +51,7 @@ public class SparkTest {
|
||||
.iatHostUrl("https://iat-api.xfyun.cn/v2/iat")
|
||||
.ttsHostUrl("https://tts-api.xfyun.cn/v2/tts")
|
||||
.otsHostUrl("https://ntrans.xfyun.cn/v2/ots")
|
||||
.httpAPIPassword("EfqszvaEEoTnUfQRRcvr:ohEYAwzpIiUeWFvZAqEk")
|
||||
.appId("83b8ddca")
|
||||
.apiSecret("ZWE2MjkzY2VmZDkwM2EwZGJhNGRhOWJm")
|
||||
.apiKey("e092f93e28ebe6d27f756bb2d884dcff")
|
||||
@@ -185,7 +186,7 @@ public class SparkTest {
|
||||
|
||||
@Test
|
||||
public void iat() throws IOException {
|
||||
String file = "src/main/resources/iat/file.mp3";
|
||||
String file = "src/main/resources/iat/cn.pcm";
|
||||
try(InputStream is = new FileInputStream(file)){
|
||||
AlitaResult<String> result = WebIATWS.execute(is, xfProperties);
|
||||
log.info("{}", result);
|
||||
@@ -239,4 +240,16 @@ public class SparkTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void chat(){
|
||||
ChatReq req = ChatReq.builder().message(MessageDTO.builder().role("system").content(
|
||||
"你是一位专业的简历分析专家。目标任务:请根据我给出的信息,分析得出简历信息。不要自己填充json信息")
|
||||
.role("user").content("我是大学生")
|
||||
.build()).build();
|
||||
|
||||
AlitaResult<String> result = XfSparkProvider.httpChat(req, xfProperties.getHttpAPIPassword());
|
||||
Assert.isTrue(result.getSuccess(), result.getMsg());
|
||||
log.info("{}", result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user