parent
11910640c6
commit
878996573b
@ -0,0 +1,36 @@
|
||||
package com.supervision;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.supervision.qanything.QanythingService;
|
||||
import com.supervision.qanything.dto.ChatResult;
|
||||
import com.supervision.qanything.dto.ResultWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
|
||||
@Slf4j
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
public class YoudaoTest {
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private QanythingService qanythingService;
|
||||
|
||||
|
||||
@Test
|
||||
public void qanythingChatTest() throws NoSuchAlgorithmException {
|
||||
|
||||
/*ResultWrapper<ChatResult> chat = qanythingService.chat("怎样创建创建知识库", CollUtil.newArrayList("KB249d43fdb96f4e1399340b8f95e1baa0_240328"));
|
||||
|
||||
System.out.println("返回结果:"+ JSONUtil.toJsonStr(chat));
|
||||
System.out.println(chat.getResult().getResponse());*/
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue