Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-api
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-api
Commits
fe7e6177
You need to sign in or sign up before continuing.
Commit
fe7e6177
authored
Sep 18, 2025
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix[车险]:修复对话结束无[DONE]输出问题
parent
19a3f26f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
53 deletions
+57
-53
pom.xml
pom.xml
+1
-1
AiDialoguesServiceImpl.java
...c/ai_dialogues/aggregate/impl/AiDialoguesServiceImpl.java
+56
-52
No files found.
pom.xml
View file @
fe7e6177
...
...
@@ -340,7 +340,7 @@
<dependency>
<groupId>
com.baidubce
</groupId>
<artifactId>
appbuilder
</artifactId>
<version>
0.9.4
</version>
<version>
1.1.0
</version>
</dependency>
<dependency>
...
...
src/main/java/cn/com/poc/ai_dialogues/aggregate/impl/AiDialoguesServiceImpl.java
View file @
fe7e6177
...
...
@@ -339,6 +339,7 @@ public class AiDialoguesServiceImpl implements AiDialoguesService {
StringBuilder
reasoningContentBuilder
=
new
StringBuilder
();
long
inputTimeStamp
=
System
.
currentTimeMillis
();
try
{
if
(
dialoguesType
.
equals
(
AiDialoguesTypeEnum
.
CAR_INSURANCE
.
getType
()))
{
//AppBuilder
BizAiDialogues3rdRelationEntity
bizAiDialogues3rdRelationEntity
=
new
BizAiDialogues3rdRelationEntity
();
bizAiDialogues3rdRelationEntity
.
setDialoguesId
(
dialoguesId
);
...
...
@@ -352,6 +353,7 @@ public class AiDialoguesServiceImpl implements AiDialoguesService {
while
(
iterator
.
hasNext
())
{
AppBuilderClientResult
res
=
iterator
.
next
();
LargeModelDemandResult
largeModelDemandResult
=
new
LargeModelDemandResult
();
largeModelDemandResult
.
setCode
(
"0"
);
if
(
ArrayUtils
.
isNotEmpty
(
res
.
getEvents
()))
{
Event
event
=
res
.
getEvents
()[
0
];
String
eventType
=
event
.
getEventType
();
...
...
@@ -369,11 +371,13 @@ public class AiDialoguesServiceImpl implements AiDialoguesService {
}
sseUtil
.
send
(
JsonUtils
.
serialize
(
largeModelDemandResult
));
}
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
());
sseUtil
.
completeByError
(
e
.
getMessage
());
}
finally
{
sseUtil
.
send
(
"[DONE]"
);
sseUtil
.
complete
();
}
//保存对话记录
//用户输入记录
BizAgentApplicationDialoguesRecordEntity
inputRecord
=
new
BizAgentApplicationDialoguesRecordEntity
();
...
...
@@ -397,7 +401,7 @@ public class AiDialoguesServiceImpl implements AiDialoguesService {
outputRecord
.
setContent
(
contentBuilder
.
toString
());
outputRecord
.
setReasoningContent
(
reasoningContentBuilder
.
toString
());
bizAgentApplicationDialoguesRecordService
.
save
(
outputRecord
);
}
return
contentBuilder
.
toString
();
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment