新增chat robot 模块跨域
This commit is contained in:
@@ -46,7 +46,8 @@ public class AuthenticationFilter extends OncePerRequestFilter {
|
||||
"/api/python/saveGeneratePicture", "/api/python/getLibraryByUserId",
|
||||
"/api/third/party/addUser","/api/third/party/editUser","/api/element/initDefaultSysFile",
|
||||
"/api/python/chatStream",
|
||||
"/api/python/flush");
|
||||
"/api/python/flush"
|
||||
);
|
||||
|
||||
@Override
|
||||
protected void doFilterInternal(HttpServletRequest httpServletRequest, @NonNull HttpServletResponse httpServletResponse, @NonNull FilterChain filterChain) throws ServletException, IOException {
|
||||
|
||||
@@ -67,6 +67,7 @@ public class PythonController {
|
||||
Collectors.mapping(PythonLibraryVo::getUrl, Collectors.toList()))));
|
||||
}
|
||||
|
||||
@CrossOrigin
|
||||
@ApiOperation(value = "发送用户输入消息")
|
||||
@PostMapping("/chatStream")
|
||||
public SseEmitter MessageToPythonChatStream(@RequestBody ChatSendDTO chatSendDTO) {
|
||||
@@ -74,6 +75,7 @@ public class PythonController {
|
||||
return chatRobotService.sendMessageToChatRobot(chatSendDTO);
|
||||
}
|
||||
|
||||
@CrossOrigin
|
||||
@ApiOperation(value = "刷新会话缓存")
|
||||
@PostMapping("/flush")
|
||||
public Response<String> ChatBufferFlush(@RequestBody ChatFlushDTO chatFlushDTO) {
|
||||
|
||||
Reference in New Issue
Block a user