Forráskód Böngészése

ai 请求是将驼峰格式修改_模式

183207892172 1 napja
szülő
commit
f5a5fd0928

+ 2 - 0
java/storlead-knowledge/storlead-knowledge-biz/src/main/java/com/storlead/knowledge/service/impl/ChatServiceImpl.java

@@ -39,6 +39,7 @@ public class ChatServiceImpl implements ChatService {
         try {
             String url = difyProperties.getBaseUrl() + "chat-messages";
             String body = JacksonHolder.OBJECT_MAPPER.writeValueAsString(chatDTO);
+            body = body.replace("responseMode","response_mode").replace("conversationId","conversation_id");
             Result<Object> result = httpService.post(url, null, "Bearer " + chatDTO.getAppId(), body, new TypeReference<>() {});
 
             if (result.isSuccess() && result.getResult() != null) {
@@ -55,6 +56,7 @@ public class ChatServiceImpl implements ChatService {
         try {
             String url = difyProperties.getBaseUrl() + "chat-messages";
             String body = JacksonHolder.OBJECT_MAPPER.writeValueAsString(chatDTO);
+            body = body.replace("responseMode","response_mode").replace("conversationId","conversation_id");
             Result<Object> result = httpService.post(url, null, "Bearer " + chatDTO.getAppId(), body, new TypeReference<>() {
             });
             if (result.isSuccess() && result.getResult() != null) {