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
cd6d79b8
Commit
cd6d79b8
authored
Dec 11, 2024
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 模型信息搜索 v2
parent
42911469
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
AgentApplicationInfoRest.java
.../poc/agent_application/rest/AgentApplicationInfoRest.java
+5
-0
AgentApplicationInfoRestImpl.java
...t_application/rest/impl/AgentApplicationInfoRestImpl.java
+35
-0
No files found.
src/main/java/cn/com/poc/agent_application/rest/AgentApplicationInfoRest.java
View file @
cd6d79b8
...
...
@@ -72,6 +72,11 @@ public interface AgentApplicationInfoRest extends BaseRest {
*/
BizAgentApplicationLargeModelListDto
getLargeModelInfo
(
@RequestParam
String
query
)
throws
Exception
;
/**
* 查询模型信息_v2
*/
BizAgentApplicationLargeModelListV2Dto
getLargeModelInfoV2
(
@RequestParam
String
query
)
throws
Exception
;
/**
* 角色指令AI生成
...
...
src/main/java/cn/com/poc/agent_application/rest/impl/AgentApplicationInfoRestImpl.java
View file @
cd6d79b8
...
...
@@ -345,6 +345,41 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
return
result
;
}
@Override
public
BizAgentApplicationLargeModelListV2Dto
getLargeModelInfoV2
(
String
query
)
throws
Exception
{
Assert
.
notNull
(
query
);
BizAgentApplicationLargeModelListEntity
bizAgentApplicationLargeModelListEntity
=
new
BizAgentApplicationLargeModelListEntity
();
bizAgentApplicationLargeModelListEntity
.
setModelNickName
(
query
);
List
<
BizAgentApplicationLargeModelListEntity
>
entities
=
bizAgentApplicationLargeModelListService
.
findByExample
(
bizAgentApplicationLargeModelListEntity
,
null
);
if
(
CollectionUtils
.
isEmpty
(
entities
))
{
throw
new
I18nMessageException
(
"exception/model.not.exist"
);
}
BizAgentApplicationLargeModelListEntity
entity
=
entities
.
get
(
0
);
BizPointDeductionRulesEntity
bizPointDeductionRulesEntity
=
new
BizPointDeductionRulesEntity
();
bizPointDeductionRulesEntity
.
setRuleType
(
RuleType
.
MODEL
.
getRuleType
());
bizPointDeductionRulesEntity
.
setRelationId
(
query
);
bizPointDeductionRulesEntity
.
setIsDeleted
(
CommonConstant
.
IsDeleted
.
N
);
List
<
BizPointDeductionRulesEntity
>
rulesEntityList
=
bizPointDeductionRulesService
.
findByExample
(
bizPointDeductionRulesEntity
,
null
);
BizAgentApplicationLargeModelListV2Dto
result
=
new
BizAgentApplicationLargeModelListV2Dto
();
List
<
LargeModelInfo
>
largeModelInfos
=
new
ArrayList
<>();
LargeModelInfo
largeModelInfo
=
new
LargeModelInfo
();
largeModelInfo
.
setModelNickName
(
entity
.
getModelNickName
());
Long
pointNumber
=
0L
;
if
(
CollectionUtils
.
isNotEmpty
(
rulesEntityList
))
{
pointNumber
=
rulesEntityList
.
get
(
0
).
getNumber
();
}
BigDecimal
points
=
new
BigDecimal
(
pointNumber
).
divide
(
new
BigDecimal
(
100
),
2
,
BigDecimal
.
ROUND_HALF_UP
);
largeModelInfo
.
setPoints
(
points
);
largeModelInfos
.
add
(
largeModelInfo
);
result
.
setModels
(
largeModelInfos
);
result
.
setOwner
(
entity
.
getOwner
());
result
.
setIcon
(
entity
.
getIconUrl
());
return
result
;
}
@Override
public
void
createAgentSystem
(
AgentApplicationGCDto
dto
,
HttpServletResponse
response
)
throws
Exception
{
Assert
.
notNull
(
dto
.
getInput
());
...
...
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