|
@@ -51,7 +51,7 @@ public class ChatController {
|
|
|
* @return
|
|
* @return
|
|
|
* @throws JsonProcessingException
|
|
* @throws JsonProcessingException
|
|
|
*/
|
|
*/
|
|
|
- @PostMapping("chat")
|
|
|
|
|
|
|
+ @PostMapping("blocking")
|
|
|
@ApiOperation("创建聊天")
|
|
@ApiOperation("创建聊天")
|
|
|
public Result<Object> chat(@RequestBody ChatDTO chatDTO) throws JsonProcessingException {
|
|
public Result<Object> chat(@RequestBody ChatDTO chatDTO) throws JsonProcessingException {
|
|
|
String url = difyProperties.getBaseUrl() + "chat-messages";
|
|
String url = difyProperties.getBaseUrl() + "chat-messages";
|
|
@@ -66,7 +66,6 @@ public class ChatController {
|
|
|
log.error("保存聊天记录失败", e);
|
|
log.error("保存聊天记录失败", e);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -77,7 +76,7 @@ public class ChatController {
|
|
|
* @return
|
|
* @return
|
|
|
* @throws IOException
|
|
* @throws IOException
|
|
|
*/
|
|
*/
|
|
|
- @PostMapping(value = "chatStreaming", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
|
|
|
|
|
|
|
+ @PostMapping(value = "streaming", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
|
|
|
@ApiOperation("创建聊天 流式返回")
|
|
@ApiOperation("创建聊天 流式返回")
|
|
|
public SseEmitter chatStreaming(@RequestBody ChatDTO chatDTO) throws IOException {
|
|
public SseEmitter chatStreaming(@RequestBody ChatDTO chatDTO) throws IOException {
|
|
|
|
|
|