|
|
|
@ -42,7 +42,6 @@ public class QianFanBigModuleServiceImpl implements QianFanBigModuleService {
|
|
|
|
|
@Override
|
|
|
|
|
public ResultEntity createArticleByAi(StuCreateArticleDTO stuCreateArticleDTO) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ChatResponse response = new Qianfan("OAuth",accessKey, secretKey).chatCompletion()
|
|
|
|
|
.model("ERNIE-3.5-8K") // 使用model指定预置模型
|
|
|
|
|
//.endpoint("ERNIE-Bot") // 也可以使用endpoint指定任意模型 (二选一)
|
|
|
|
@ -50,10 +49,8 @@ public class QianFanBigModuleServiceImpl implements QianFanBigModuleService {
|
|
|
|
|
.temperature(0.7) // 自定义超参数
|
|
|
|
|
.execute(); // 发起请求
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new ResultEntity<>(response.getResult());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|