-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
启动完成之后,对话报错。
Expected Behavior
No response
Steps To Reproduce
No response
Environment
Spring AI Alibaba version(s):
Debug logs
2025-07-18 12:10:33 [http-nio-8080-exec-5] DEBUG org.springframework.web.servlet.DispatcherServlet - POST "/api/v1/chat", parameters={}
2025-07-18 12:10:33 [http-nio-8080-exec-5] DEBUG org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped to com.alibaba.cloud.ai.application.controller.SAAChatController#chat(HttpServletResponse, String, String, String)
2025-07-18 12:10:33 [http-nio-8080-exec-5] DEBUG org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor - Read "application/json;charset=UTF-8" to ["如何使用 Spring AI Alibaba 构建聊天机器人?"]
2025-07-18 12:10:33 [http-nio-8080-exec-5] DEBUG com.alibaba.cloud.ai.application.service.SAAChatService - chat model is: deepseek-v3
2025-07-18 12:10:33 [http-nio-8080-exec-5] INFO com.alibaba.cloud.ai.application.aop.UserIpAspect - User IP: 0:0:0:0:0:0:0:1, Time: 2025-07-18 12:10:33, Uri: /api/v1/chat
2025-07-18 12:10:33 [http-nio-8080-exec-5] DEBUG org.hibernate.SQL - select u1_0.id,u1_0.max_request_count,u1_0.request_count,u1_0.request_ip,u1_0.request_time,u1_0.request_uri from users u1_0 where u1_0.request_ip=?
Hibernate: select u1_0.id,u1_0.max_request_count,u1_0.request_count,u1_0.request_ip,u1_0.request_time,u1_0.request_uri from users u1_0 where u1_0.request_ip=?
2025-07-18 12:10:33 [http-nio-8080-exec-5] DEBUG org.hibernate.SQL - update users set max_request_count=?,request_count=?,request_ip=?,request_time=?,request_uri=? where id=?
Hibernate: update users set max_request_count=?,request_count=?,request_ip=?,request_time=?,request_uri=? where id=?
2025-07-18 12:10:33 [http-nio-8080-exec-5] DEBUG org.springframework.web.context.request.async.WebAsyncManager - Started async request for "/api/v1/chat"
2025-07-18 12:10:33 [boundedElastic-4] DEBUG org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL query
2025-07-18 12:10:33 [http-nio-8080-exec-5] DEBUG org.springframework.web.servlet.DispatcherServlet - Exiting but response remains open for further handling
2025-07-18 12:10:33 [boundedElastic-4] DEBUG org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL statement [SELECT content, type FROM ai_chat_memory WHERE conversation_id = ? ORDER BY "timestamp"
]
2025-07-18 12:10:33 [boundedElastic-4] DEBUG org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL query
2025-07-18 12:10:33 [boundedElastic-4] DEBUG org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL statement [SELECT content, type FROM ai_chat_memory WHERE conversation_id = ? ORDER BY "timestamp"
]
2025-07-18 12:10:33 [boundedElastic-4] DEBUG org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL update
2025-07-18 12:10:33 [boundedElastic-4] DEBUG org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL statement [DELETE FROM ai_chat_memory WHERE conversation_id = ?]
2025-07-18 12:10:33 [boundedElastic-4] DEBUG org.springframework.jdbc.core.JdbcTemplate - Executing SQL batch update [INSERT INTO ai_chat_memory (conversation_id, content, type, "timestamp") VALUES (?, ?, ?, ?)
]
2025-07-18 12:10:33 [boundedElastic-4] DEBUG org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL statement [INSERT INTO ai_chat_memory (conversation_id, content, type, "timestamp") VALUES (?, ?, ?, ?)
]
2025-07-18 12:10:33 [boundedElastic-5] DEBUG org.springframework.web.client.DefaultRestClient - Reading to [com.alibaba.cloud.ai.dashscope.api.DashScopeApi$QueryPipelineResponse]
2025-07-18 12:10:33 [boundedElastic-5] ERROR org.springframework.ai.chat.model.MessageAggregator - Aggregation Error
java.lang.IllegalStateException: Stream processing failed
at org.springframework.ai.chat.client.advisor.api.BaseAdvisor.lambda$adviseStream$2(BaseAdvisor.java:73)
at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:94)
at reactor.core.publisher.FluxMap$MapSubscriber.onError(FluxMap.java:134)
at reactor.core.publisher.MonoFlatMapMany$FlatMapManyMain.onError(MonoFlatMapMany.java:205)
at reactor.core.publisher.FluxMap$MapSubscriber.onError(FluxMap.java:134)
at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:114)
at reactor.core.publisher.FluxSubscribeOnValue$ScheduledScalar.run(FluxSubscribeOnValue.java:181)
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: com.alibaba.cloud.ai.dashscope.common.DashScopeException: Index:saa-playground-2 NotExist
at com.alibaba.cloud.ai.dashscope.rag.DashScopeDocumentRetriever.retrieve(DashScopeDocumentRetriever.java:48)
at com.alibaba.cloud.ai.advisor.DocumentRetrievalAdvisor.before(DocumentRetrievalAdvisor.java:93)
at org.springframework.ai.chat.client.advisor.api.BaseAdvisor.lambda$adviseStream$0(BaseAdvisor.java:65)
at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:106)
... 8 common frames omitted
2025-07-18 12:10:33 [task-3] DEBUG org.springframework.web.context.request.async.WebAsyncManager - Async result set for "/api/v1/chat"
2025-07-18 12:10:33 [task-3] DEBUG org.springframework.web.context.request.async.WebAsyncManager - Performing async dispatch for "/api/v1/chat"
2025-07-18 12:10:33 [http-nio-8080-exec-6] DEBUG org.springframework.web.servlet.DispatcherServlet - "ASYNC" dispatch for POST "/api/v1/chat", parameters={}
2025-07-18 12:10:33 [http-nio-8080-exec-6] DEBUG org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter - Resume with async result [java.lang.IllegalStateException: Stream processing failed]
2025-07-18 12:10:33 [http-nio-8080-exec-6] DEBUG org.springframework.web.servlet.DispatcherServlet - Unresolved failure from "ASYNC" dispatch: java.lang.IllegalStateException: Stream processing failed
2025-07-18 12:10:33 [http-nio-8080-exec-6] ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] threw exception
com.alibaba.cloud.ai.dashscope.common.DashScopeException: Index:saa-playground-2 NotExist
at com.alibaba.cloud.ai.dashscope.rag.DashScopeDocumentRetriever.retrieve(DashScopeDocumentRetriever.java:48)
at com.alibaba.cloud.ai.advisor.DocumentRetrievalAdvisor.before(DocumentRetrievalAdvisor.java:93)
at org.springframework.ai.chat.client.advisor.api.BaseAdvisor.lambda$adviseStream$0(BaseAdvisor.java:65)
at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:106)
at reactor.core.publisher.FluxSubscribeOnValue$ScheduledScalar.run(FluxSubscribeOnValue.java:181)
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
2025-07-18 12:10:33 [http-nio-8080-exec-6] ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: java.lang.IllegalStateException: Stream processing failed] with root cause
com.alibaba.cloud.ai.dashscope.common.DashScopeException: Index:saa-playground-2 NotExist
at com.alibaba.cloud.ai.dashscope.rag.DashScopeDocumentRetriever.retrieve(DashScopeDocumentRetriever.java:48)
at com.alibaba.cloud.ai.advisor.DocumentRetrievalAdvisor.before(DocumentRetrievalAdvisor.java:93)
at org.springframework.ai.chat.client.advisor.api.BaseAdvisor.lambda$adviseStream$0(BaseAdvisor.java:65)
at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:106)
at reactor.core.publisher.FluxSubscribeOnValue$ScheduledScalar.run(FluxSubscribeOnValue.java:181)
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)