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
e0282dc3
Commit
e0282dc3
authored
Dec 26, 2025
by
youxiaoji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* [暂存函数发送数据时,如果字段存在值,将字段值一起返回]
* [提示词不再添加历史信息,将LLM当做无状态处理,信息由暂存接口保存处理]
parent
5eb0441b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
DefaultReactExecutor.java
...java/pangea/hiagent/agent/react/DefaultReactExecutor.java
+1
-1
VisitorAppointmentTool.java
...java/pangea/hiagent/tool/impl/VisitorAppointmentTool.java
+7
-7
No files found.
backend/src/main/java/pangea/hiagent/agent/react/DefaultReactExecutor.java
View file @
e0282dc3
...
@@ -187,7 +187,7 @@ public class DefaultReactExecutor implements ReactExecutor {
...
@@ -187,7 +187,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 @
e0282dc3
...
@@ -142,12 +142,12 @@ public class VisitorAppointmentTool {
...
@@ -142,12 +142,12 @@ public class VisitorAppointmentTool {
}
}
@Tool
(
description
=
"提交访客预约申请"
)
@Tool
(
description
=
"提交访客预约申请"
)
public
String
submitAppointmentApply
(
JSONObject
jsonObjec
t
)
{
public
String
submitAppointmentApply
(
ToolContext
toolContex
t
)
{
sharedContext
.
tracing
().
start
(
new
Tracing
.
StartOptions
()
sharedContext
.
tracing
().
start
(
new
Tracing
.
StartOptions
()
.
setScreenshots
(
true
)
.
setScreenshots
(
true
)
.
setSnapshots
(
true
)
.
setSnapshots
(
true
)
.
setSources
(
true
));
.
setSources
(
true
));
log
.
info
(
"
jsonObject = {}"
,
jsonObject
);
log
.
info
(
"
submit apply info "
);
JSONArray
jsonArray
=
infoCollectorService
.
getInfo
(
pageId
);
JSONArray
jsonArray
=
infoCollectorService
.
getInfo
(
pageId
);
long
startTime
=
System
.
currentTimeMillis
();
long
startTime
=
System
.
currentTimeMillis
();
...
@@ -175,7 +175,7 @@ public class VisitorAppointmentTool {
...
@@ -175,7 +175,7 @@ public class VisitorAppointmentTool {
log
.
info
(
"json {}"
,
obj
);
log
.
info
(
"json {}"
,
obj
);
String
fieldName
=
obj
.
getString
(
"field_name"
);
String
fieldName
=
obj
.
getString
(
"field_name"
);
String
fieldValue
=
jsonObject
.
getString
(
obj
.
getString
(
"code"
)
);
String
fieldValue
=
infoCollectorService
.
getValue
(
obj
.
getString
(
"code"
)).
toString
(
);
if
(
fieldName
.
compareToIgnoreCase
(
"访问园区"
)
==
0
)
{
if
(
fieldName
.
compareToIgnoreCase
(
"访问园区"
)
==
0
)
{
parkValue
=
fieldValue
;
parkValue
=
fieldValue
;
continue
;
continue
;
...
@@ -209,7 +209,7 @@ public class VisitorAppointmentTool {
...
@@ -209,7 +209,7 @@ public class VisitorAppointmentTool {
for
(
JSONObject
tmp
:
dateJson
)
{
for
(
JSONObject
tmp
:
dateJson
)
{
String
fieldName
=
tmp
.
getString
(
"field_name"
);
String
fieldName
=
tmp
.
getString
(
"field_name"
);
String
fieldValue
=
jsonObject
.
getString
(
tmp
.
getString
(
"code"
)
);
String
fieldValue
=
infoCollectorService
.
getValue
(
tmp
.
getString
(
"code"
)).
toString
(
);
String
[]
values
=
fieldValue
.
split
(
"-"
);
String
[]
values
=
fieldValue
.
split
(
"-"
);
page
.
locator
(
".van-cell"
)
page
.
locator
(
".van-cell"
)
...
@@ -279,8 +279,8 @@ public class VisitorAppointmentTool {
...
@@ -279,8 +279,8 @@ public class VisitorAppointmentTool {
JSONArray
lackJson
=
new
JSONArray
();
JSONArray
lackJson
=
new
JSONArray
();
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
JSONObject
tmp
=
jsonArray
.
getJSONObject
(
i
);
JSONObject
tmp
=
jsonArray
.
getJSONObject
(
i
);
if
(
keys
.
contains
(
tmp
.
getString
(
"field_name"
)))
{
if
(
infoCollectorService
.
getValue
(
tmp
.
getString
(
"code"
))
!=
null
)
{
lackJson
.
add
(
tmp
.
getJSONObject
(
"pangea_json"
));
tmp
.
put
(
"value"
,
infoCollectorService
.
getValue
(
tmp
.
getString
(
"code"
)).
toString
(
));
}
}
}
}
JSONObject
formMessage
=
new
JSONObject
();
JSONObject
formMessage
=
new
JSONObject
();
...
@@ -289,7 +289,7 @@ public class VisitorAppointmentTool {
...
@@ -289,7 +289,7 @@ public class VisitorAppointmentTool {
}
}
StringBuilder
sb
=
new
StringBuilder
();
StringBuilder
sb
=
new
StringBuilder
();
if
(
keys
.
isEmpty
())
{
if
(
keys
.
isEmpty
())
{
sb
.
append
(
"
用户已提交全部数据,提示用户
提交申请"
);
sb
.
append
(
"
所有必需信息已收集,准备
提交申请"
);
}
else
{
}
else
{
sb
.
append
(
"用户还有以下信息未提交:"
);
sb
.
append
(
"用户还有以下信息未提交:"
);
sb
.
append
(
"\n"
);
sb
.
append
(
"\n"
);
...
...
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