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