chat robot

This commit is contained in:
zhouchengrong
2023-07-26 14:58:05 +08:00
parent efdaa75be0
commit b6ad019dec
2 changed files with 4 additions and 3 deletions

View File

@@ -45,7 +45,8 @@ public class AuthenticationFilter extends OncePerRequestFilter {
"/webjars/","/swagger-resources","/v2/api-docs","api/account/resetPwd",
"/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/chatStream",
"/api/python/flush");
@Override
protected void doFilterInternal(HttpServletRequest httpServletRequest, @NonNull HttpServletResponse httpServletResponse, @NonNull FilterChain filterChain) throws ServletException, IOException {

View File

@@ -41,7 +41,7 @@ public class ChatRobotServiceImpl implements ChatRobotService {
Gson gson = new GsonBuilder().create();
private final ExecutorService executorService = Executors.newSingleThreadExecutor();
Integer timeout = 9999999;
Integer timeout = 99999999;
@Override
public SseEmitter sendMessageToChatRobot(ChatSendDTO chatSendDTO) {
@@ -73,7 +73,7 @@ public class ChatRobotServiceImpl implements ChatRobotService {
log.info(line);
emitter.send(line);
Thread.sleep(1000);
// Thread.sleep(1000);
}
reader.close();