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
0
Merge Requests
0
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
a1e01f79
Commit
a1e01f79
authored
Jan 22, 2025
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:【【POE】-【首页】移除插件后更新发布,首页的插件仍可以使用】 --bug=1009895
parent
b9bc3a01
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
BizAgentApplicationPublishConvert.java
...pplication/convert/BizAgentApplicationPublishConvert.java
+4
-1
DocumentUnderstandIngFunction.java
...document_understanding/DocumentUnderstandIngFunction.java
+7
-3
No files found.
src/main/java/cn/com/poc/agent_application/convert/BizAgentApplicationPublishConvert.java
View file @
a1e01f79
...
...
@@ -99,11 +99,14 @@ public class BizAgentApplicationPublishConvert {
model
.
setTemperature
(
entity
.
getTemperature
());
if
(
ArrayUtils
.
isNotEmpty
(
entity
.
getUnitIds
()))
{
model
.
setUnitIds
(
JsonUtil
.
toJson
(
entity
.
getUnitIds
()));
}
else
{
model
.
setUnitIds
(
JsonUtil
.
toJson
(
new
ArrayList
<>()));
}
if
(
ObjectUtil
.
isNotEmpty
(
entity
.
getVoiceConfig
()))
{
model
.
setVoiceConfig
(
JsonUtils
.
serialize
(
entity
.
getVoiceConfig
()));
}
else
{
model
.
setVoiceConfig
(
null
);
}
model
.
setIsDeleted
(
entity
.
getIsDeleted
());
model
.
setCreator
(
entity
.
getCreator
());
model
.
setCreatedTime
(
entity
.
getCreatedTime
());
...
...
src/main/java/cn/com/poc/thirdparty/resource/demand/ai/function/document_understanding/DocumentUnderstandIngFunction.java
View file @
a1e01f79
...
...
@@ -39,7 +39,7 @@ public class DocumentUnderstandIngFunction extends AbstractLargeModelFunction {
"## 用户问题\n"
+
"${question}"
;
private
final
String
DESC
=
"
长文档内容理解,支持信息检索、摘要总结、文本分析能力。
"
;
private
final
String
DESC
=
"
仅支持文档doc、docx、pdf、txt、md、xlsx、csv、xls,解析长文档内容理解,支持信息检索、摘要总结、文本分析能力,不可解析网页
"
;
private
final
FunctionLLMConfig
functionLLMConfig
=
new
FunctionLLMConfig
.
FunctionLLMConfigBuilder
()
...
...
@@ -61,8 +61,12 @@ public class DocumentUnderstandIngFunction extends AbstractLargeModelFunction {
String
question
=
jsonObject
.
getString
(
"question"
);
String
fileUrl
=
jsonObject
.
getString
(
"file_url"
);
File
file
=
DocumentLoad
.
downloadURLDocument
(
fileUrl
);
String
documentContent
=
DocumentLoad
.
documentToText
(
file
);
String
documentContent
;
try
{
documentContent
=
DocumentLoad
.
documentToText
(
file
);
}
catch
(
Exception
e
)
{
documentContent
=
StringUtils
.
EMPTY
;
}
Message
message
=
new
Message
();
message
.
setRole
(
"user"
);
message
.
setContent
(
TEMPLATE
.
replace
(
"${document_content}"
,
documentContent
).
replace
(
"${question}"
,
question
));
...
...
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