Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-mindworkplate
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a359a861
authored
Jun 29, 2026
by
潘诗林
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix:获取大模型返回的错误信息
1 parent
78ed5c19
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/prelearn/PreLearnBigModelService.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/prelearn/PreLearnBigModelService.java
View file @
a359a86
...
@@ -69,7 +69,7 @@ public class PreLearnBigModelService {
...
@@ -69,7 +69,7 @@ public class PreLearnBigModelService {
@SuppressWarnings
(
"unchecked"
)
@SuppressWarnings
(
"unchecked"
)
public
String
submitAsyncTask
(
String
recordingText
)
{
public
String
submitAsyncTask
(
String
recordingText
)
{
try
{
try
{
String
url
=
env
.
getProperty
(
"big.model.base.prelearn.url"
,
"http://192.168.1.191:80
00
/api/v1/calls/by-template"
);
String
url
=
env
.
getProperty
(
"big.model.base.prelearn.url"
,
"http://192.168.1.191:80
11
/api/v1/calls/by-template"
);
String
template_id
=
env
.
getProperty
(
"big.model.base.prelearn.template"
,
"CPPE-BENCH-001"
);
String
template_id
=
env
.
getProperty
(
"big.model.base.prelearn.template"
,
"CPPE-BENCH-001"
);
String
account_id
=
env
.
getProperty
(
"big.model.base.prelearn.account"
,
"LEGACY-eb0333776935"
);
String
account_id
=
env
.
getProperty
(
"big.model.base.prelearn.account"
,
"LEGACY-eb0333776935"
);
...
@@ -236,7 +236,7 @@ public class PreLearnBigModelService {
...
@@ -236,7 +236,7 @@ public class PreLearnBigModelService {
@SuppressWarnings
(
"unchecked"
)
@SuppressWarnings
(
"unchecked"
)
public
TaskQueryResult
queryTaskResult
(
String
modelTaskId
)
{
public
TaskQueryResult
queryTaskResult
(
String
modelTaskId
)
{
try
{
try
{
String
baseUrl
=
env
.
getProperty
(
"big.model.base.prelearn.query.url"
,
"http://192.168.1.191:80
00
/api/v1/calls/orchestrate/async?task_id="
);
String
baseUrl
=
env
.
getProperty
(
"big.model.base.prelearn.query.url"
,
"http://192.168.1.191:80
11
/api/v1/calls/orchestrate/async?task_id="
);
String
url
=
baseUrl
+
modelTaskId
;
String
url
=
baseUrl
+
modelTaskId
;
log
.
info
(
"queryTaskResult: 查询任务结果, taskId={}"
,
modelTaskId
);
log
.
info
(
"queryTaskResult: 查询任务结果, taskId={}"
,
modelTaskId
);
...
@@ -309,13 +309,13 @@ public class PreLearnBigModelService {
...
@@ -309,13 +309,13 @@ public class PreLearnBigModelService {
if
(
result
.
isCompleted
())
{
if
(
result
.
isCompleted
())
{
// 检查 scriptJson 外层的 is_legal 字段
// 检查 scriptJson 外层的 is_legal 字段
boolean
isLegal
=
fals
e
;
boolean
isLegal
=
tru
e
;
String
legalMsg
=
null
;
String
legalMsg
=
null
;
if
(
StringUtils
.
hasText
(
result
.
getScriptJson
()))
{
if
(
StringUtils
.
hasText
(
result
.
getScriptJson
()))
{
try
{
try
{
JSONObject
outerJson
=
JSONObject
.
parseObject
(
result
.
getScriptJson
());
JSONObject
outerJson
=
JSONObject
.
parseObject
(
result
.
getScriptJson
());
if
(
outerJson
.
containsKey
(
"is_legal"
)
&&
outerJson
.
getBooleanValue
(
"is_legal"
))
{
if
(
outerJson
.
containsKey
(
"is_legal"
)
&&
!
outerJson
.
getBooleanValue
(
"is_legal"
))
{
isLegal
=
tru
e
;
isLegal
=
fals
e
;
legalMsg
=
outerJson
.
getString
(
"msg"
);
legalMsg
=
outerJson
.
getString
(
"msg"
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment