|
@@ -562,6 +562,7 @@ public class DifyService {
|
|
|
BufferedReader bufferedReader = new BufferedReader(reader);
|
|
|
String line;
|
|
|
String prefixToRemove = "data: ";
|
|
|
+ String runId = conversationId;
|
|
|
while ((line = bufferedReader.readLine()) != null) {
|
|
|
if (line.isEmpty()) {
|
|
|
continue;
|
|
@@ -573,8 +574,9 @@ public class DifyService {
|
|
|
JSONObject jsonObject = JSON.parseObject(line);
|
|
|
String sessionConversationId = jsonObject.get("conversation_id").toString();
|
|
|
String event = jsonObject.get("event").toString();
|
|
|
- if (StringUtils.isEmpty(conversationId)) {
|
|
|
+ if (StringUtils.isEmpty(runId)) {
|
|
|
if (StringUtils.isNotEmpty(sessionConversationId)) {
|
|
|
+ runId = sessionConversationId;
|
|
|
confessionSessionMapper.updateSingleField(confessionSessionId, "conversation_id", sessionConversationId);
|
|
|
}
|
|
|
}
|