案例专家:打印入参,调试用

This commit is contained in:
liu.zixi
2025-10-11 11:43:49 +08:00
parent 5666cfeaaa
commit 5e20e21e86

View File

@@ -101,6 +101,9 @@ public class CaseAiChatServiceImpl implements ICaseAiChatService {
chatParam.put("kIds", kIds);
chatParam.put("query", caseAiChatDto.getQuery());
chatParam.put("conversationId", conversationId);
chatParam.put("enableThinking", true);
String chatParamStr = chatParam.toJSONString();
log.info("案例问答接口请求参数: [{}]", chatParamStr);
// 4. 设置请求头
String accessToken = aiAccessTokenService.getAccessToken();
@@ -109,7 +112,7 @@ public class CaseAiChatServiceImpl implements ICaseAiChatService {
builder.url(caseAiProperties.getBaseUrl() + "/apigateway/chat/knowledge/v1/chat/completions");
builder.addHeader("access_token", accessToken);
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);
Request request = builder.build();