chat robot
This commit is contained in:
@@ -45,7 +45,8 @@ public class AuthenticationFilter extends OncePerRequestFilter {
|
|||||||
"/webjars/","/swagger-resources","/v2/api-docs","api/account/resetPwd",
|
"/webjars/","/swagger-resources","/v2/api-docs","api/account/resetPwd",
|
||||||
"/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/flush");
|
"/api/python/chatStream",
|
||||||
|
"/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 {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class ChatRobotServiceImpl implements ChatRobotService {
|
|||||||
|
|
||||||
Gson gson = new GsonBuilder().create();
|
Gson gson = new GsonBuilder().create();
|
||||||
private final ExecutorService executorService = Executors.newSingleThreadExecutor();
|
private final ExecutorService executorService = Executors.newSingleThreadExecutor();
|
||||||
Integer timeout = 9999999;
|
Integer timeout = 99999999;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SseEmitter sendMessageToChatRobot(ChatSendDTO chatSendDTO) {
|
public SseEmitter sendMessageToChatRobot(ChatSendDTO chatSendDTO) {
|
||||||
@@ -73,7 +73,7 @@ public class ChatRobotServiceImpl implements ChatRobotService {
|
|||||||
log.info(line);
|
log.info(line);
|
||||||
|
|
||||||
emitter.send(line);
|
emitter.send(line);
|
||||||
Thread.sleep(1000);
|
// Thread.sleep(1000);
|
||||||
|
|
||||||
}
|
}
|
||||||
reader.close();
|
reader.close();
|
||||||
|
|||||||
Reference in New Issue
Block a user