mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-13 21:06:48 +08:00
案例专家:打印入参,调试用
This commit is contained in:
@@ -101,6 +101,9 @@ public class CaseAiChatServiceImpl implements ICaseAiChatService {
|
|||||||
chatParam.put("kIds", kIds);
|
chatParam.put("kIds", kIds);
|
||||||
chatParam.put("query", caseAiChatDto.getQuery());
|
chatParam.put("query", caseAiChatDto.getQuery());
|
||||||
chatParam.put("conversationId", conversationId);
|
chatParam.put("conversationId", conversationId);
|
||||||
|
chatParam.put("enableThinking", true);
|
||||||
|
String chatParamStr = chatParam.toJSONString();
|
||||||
|
log.info("案例问答接口请求参数: [{}]", chatParamStr);
|
||||||
|
|
||||||
// 4. 设置请求头
|
// 4. 设置请求头
|
||||||
String accessToken = aiAccessTokenService.getAccessToken();
|
String accessToken = aiAccessTokenService.getAccessToken();
|
||||||
@@ -109,7 +112,7 @@ public class CaseAiChatServiceImpl implements ICaseAiChatService {
|
|||||||
builder.url(caseAiProperties.getBaseUrl() + "/apigateway/chat/knowledge/v1/chat/completions");
|
builder.url(caseAiProperties.getBaseUrl() + "/apigateway/chat/knowledge/v1/chat/completions");
|
||||||
builder.addHeader("access_token", accessToken);
|
builder.addHeader("access_token", accessToken);
|
||||||
builder.addHeader("X-AI-ApiCode", apiCode);
|
builder.addHeader("X-AI-ApiCode", apiCode);
|
||||||
RequestBody bodyRequestBody = RequestBody.create(chatParam.toJSONString(), MediaType.parse("application/json"));
|
RequestBody bodyRequestBody = RequestBody.create(chatParamStr, MediaType.parse("application/json"));
|
||||||
builder.post(bodyRequestBody);
|
builder.post(bodyRequestBody);
|
||||||
Request request = builder.build();
|
Request request = builder.build();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user