Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Pangea-Agent
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
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
Gavin-Group
Pangea-Agent
Commits
325d1649
Commit
325d1649
authored
Dec 24, 2025
by
youxiaoji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+ [增加申请信息保存和提交的功能]
parent
15abfea8
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
165 additions
and
11 deletions
+165
-11
DefaultReactExecutor.java
...java/pangea/hiagent/agent/react/DefaultReactExecutor.java
+1
-1
VisitorAppointmentTool.java
...java/pangea/hiagent/tool/impl/VisitorAppointmentTool.java
+142
-6
InfoCollectorService.java
...java/pangea/hiagent/web/service/InfoCollectorService.java
+22
-4
No files found.
backend/src/main/java/pangea/hiagent/agent/react/DefaultReactExecutor.java
View file @
325d1649
...
@@ -185,7 +185,7 @@ public class DefaultReactExecutor implements ReactExecutor {
...
@@ -185,7 +185,7 @@ public class DefaultReactExecutor implements ReactExecutor {
memoryService
.
getHistoryMessages
(
sessionId
,
historyLength
);
memoryService
.
getHistoryMessages
(
sessionId
,
historyLength
);
// 添加历史消息到Prompt
// 添加历史消息到Prompt
//
messages.addAll(historyMessages);
messages
.
addAll
(
historyMessages
);
// 将当前用户消息添加到内存中,以便下次对话使用
// 将当前用户消息添加到内存中,以便下次对话使用
memoryService
.
addUserMessageToMemory
(
sessionId
,
userInput
);
memoryService
.
addUserMessageToMemory
(
sessionId
,
userInput
);
...
...
backend/src/main/java/pangea/hiagent/tool/impl/VisitorAppointmentTool.java
View file @
325d1649
This diff is collapsed.
Click to expand it.
backend/src/main/java/pangea/hiagent/web/service/InfoCollectorService.java
View file @
325d1649
...
@@ -5,7 +5,9 @@ import com.alibaba.fastjson2.JSONObject;
...
@@ -5,7 +5,9 @@ import com.alibaba.fastjson2.JSONObject;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
pangea.hiagent.tool.impl.HisenseTripTool
;
import
pangea.hiagent.tool.impl.HisenseTripTool
;
import
pangea.hiagent.tool.impl.VisitorAppointmentTool
;
import
java.util.HashSet
;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -29,7 +31,7 @@ public class InfoCollectorService {
...
@@ -29,7 +31,7 @@ public class InfoCollectorService {
}
}
public
void
saveValue
(
String
key
,
Object
value
)
{
public
void
saveValue
(
String
key
,
Object
value
)
{
log
.
info
(
"key {} value {}"
,
key
,
value
);
log
.
info
(
"key {} value {}"
,
key
,
value
);
values
.
put
(
key
,
value
);
values
.
put
(
key
,
value
);
}
}
...
@@ -37,11 +39,27 @@ public class InfoCollectorService {
...
@@ -37,11 +39,27 @@ public class InfoCollectorService {
return
values
.
get
(
key
);
return
values
.
get
(
key
);
}
}
public
Set
<
String
>
findLackInfo
()
{
public
Set
<
String
>
findLackInfo
(
String
pageId
)
{
Set
<
String
>
valueKeys
=
values
.
keySet
();
Set
<
String
>
valueKeys
=
values
.
keySet
();
Set
<
String
>
allKeys
=
infos
.
get
(
HisenseTripTool
.
pageId
).
stream
().
map
(
t
->
((
JSONObject
)
t
).
getString
(
"field_name"
)).
collect
(
Collectors
.
toSet
());
log
.
info
(
"value keys {}"
,
valueKeys
);
Set
<
String
>
allKeys
=
infos
.
get
(
pageId
).
stream
().
map
(
t
->
((
JSONObject
)
t
).
getString
(
"code"
)).
collect
(
Collectors
.
toSet
());
log
.
info
(
"all keys {}"
,
allKeys
);
allKeys
.
removeAll
(
valueKeys
);
allKeys
.
removeAll
(
valueKeys
);
log
.
info
(
"lack keys {}"
,
allKeys
);
log
.
info
(
"lack keys {}"
,
allKeys
);
return
allKeys
;
Set
<
String
>
lackInfos
=
new
HashSet
<>();
if
(
lackInfos
.
isEmpty
()){
log
.
info
(
"info is good enough"
);
return
lackInfos
;
}
infos
.
get
(
pageId
).
stream
().
forEach
(
t
->
{
JSONObject
info
=
(
JSONObject
)
t
;
String
code
=
info
.
getString
(
"code"
);
if
(
allKeys
.
contains
(
code
))
{
lackInfos
.
add
(
info
.
getString
(
"field_name"
));
}
});
log
.
info
(
"lack infos {}"
,
lackInfos
);
return
lackInfos
;
}
}
}
}
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