|
@@ -38,7 +38,9 @@ public class WorkflowsController {
|
|
|
return workflowsService.AiWorkflows(chatDTO);
|
|
return workflowsService.AiWorkflows(chatDTO);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @PostMapping("streaming")
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping(value = "streaming")
|
|
|
@ApiOperation("执行流程 流式返回")
|
|
@ApiOperation("执行流程 流式返回")
|
|
|
public SseEmitter workflowsStreaming(@RequestBody ChatDTO chatDTO) throws IOException {
|
|
public SseEmitter workflowsStreaming(@RequestBody ChatDTO chatDTO) throws IOException {
|
|
|
|
|
|
|
@@ -47,6 +49,7 @@ public class WorkflowsController {
|
|
|
String url = difyProperties.getBaseUrl() + "workflows/run";
|
|
String url = difyProperties.getBaseUrl() + "workflows/run";
|
|
|
|
|
|
|
|
String body = JacksonHolder.OBJECT_MAPPER.writeValueAsString(chatDTO);
|
|
String body = JacksonHolder.OBJECT_MAPPER.writeValueAsString(chatDTO);
|
|
|
|
|
+ body = body.replace("responseMode","response_mode");
|
|
|
httpService.postStream(
|
|
httpService.postStream(
|
|
|
url,
|
|
url,
|
|
|
"Bearer " +chatDTO.getAppId(),
|
|
"Bearer " +chatDTO.getAppId(),
|