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
f6fc511c
Commit
f6fc511c
authored
Oct 24, 2024
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge release
parent
cbfef1d5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
2 deletions
+28
-2
AgentApplicationInfoService.java
...nt_application/aggregate/AgentApplicationInfoService.java
+7
-0
AgentApplicationConstants.java
...agent_application/constant/AgentApplicationConstants.java
+4
-2
BizAgentApplicationInfoService.java
...t_application/service/BizAgentApplicationInfoService.java
+1
-0
BizAgentApplicationInfoServiceImpl.java
...tion/service/impl/BizAgentApplicationInfoServiceImpl.java
+16
-0
No files found.
src/main/java/cn/com/poc/agent_application/aggregate/AgentApplicationInfoService.java
View file @
f6fc511c
...
@@ -21,6 +21,13 @@ public interface AgentApplicationInfoService {
...
@@ -21,6 +21,13 @@ public interface AgentApplicationInfoService {
String
callAgentApplication
(
String
identifier
,
String
largeModel
,
String
[]
unitIds
,
String
agentSystem
,
String
callAgentApplication
(
String
identifier
,
String
largeModel
,
String
[]
unitIds
,
String
agentSystem
,
Integer
[]
knowledgeIds
,
Integer
communicationTurn
,
Float
topP
,
Float
temperature
,
Integer
[]
knowledgeIds
,
Integer
communicationTurn
,
Float
topP
,
Float
temperature
,
List
<
Message
>
messages
,
List
<
Tool
>
tools
,
HttpServletResponse
httpServletResponse
)
throws
Exception
;
List
<
Message
>
messages
,
List
<
Tool
>
tools
,
HttpServletResponse
httpServletResponse
)
throws
Exception
;
/**
* 应用下架
*
* @param agentId
* @return
*/
boolean
unPublish
(
String
agentId
)
throws
Exception
;
/**
/**
* 角色指令AI生成
* 角色指令AI生成
...
...
src/main/java/cn/com/poc/agent_application/constant/AgentApplicationConstants.java
View file @
f6fc511c
...
@@ -6,10 +6,12 @@ public interface AgentApplicationConstants {
...
@@ -6,10 +6,12 @@ public interface AgentApplicationConstants {
String
DRAFT
=
"draft"
;
// 草稿
String
DRAFT
=
"draft"
;
// 草稿
String
PUBLISH
=
"publish"
;
// 已发布
String
PUBLISH
=
"publish"
;
// 发布
String
UN_PUBLISH
=
"unPublish"
;
// 已下架
static
boolean
isPublishStatus
(
String
status
)
{
static
boolean
isPublishStatus
(
String
status
)
{
return
PUBLISH
.
equals
(
status
)
||
DRAFT
.
equals
(
status
);
return
PUBLISH
.
equals
(
status
)
||
DRAFT
.
equals
(
status
)
||
UN_PUBLISH
.
equals
(
status
)
;
}
}
}
}
...
...
src/main/java/cn/com/poc/agent_application/service/BizAgentApplicationInfoService.java
View file @
f6fc511c
...
@@ -25,4 +25,5 @@ public interface BizAgentApplicationInfoService extends BaseService {
...
@@ -25,4 +25,5 @@ public interface BizAgentApplicationInfoService extends BaseService {
boolean
publish
(
String
agentId
)
throws
Exception
;
boolean
publish
(
String
agentId
)
throws
Exception
;
boolean
unPublish
(
String
agentId
);
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/service/impl/BizAgentApplicationInfoServiceImpl.java
View file @
f6fc511c
...
@@ -144,6 +144,22 @@ public class BizAgentApplicationInfoServiceImpl extends BaseServiceImpl
...
@@ -144,6 +144,22 @@ public class BizAgentApplicationInfoServiceImpl extends BaseServiceImpl
return
true
;
return
true
;
}
}
@Override
public
boolean
unPublish
(
String
agentId
)
{
Assert
.
notNull
(
agentId
);
BizAgentApplicationInfoModel
model
=
new
BizAgentApplicationInfoModel
();
model
.
setAgentId
(
agentId
);
model
.
setIsDeleted
(
CommonConstant
.
IsDeleted
.
N
);
List
<
BizAgentApplicationInfoModel
>
models
=
this
.
repository
.
findByExample
(
model
);
if
(
CollectionUtils
.
isEmpty
(
models
))
{
return
false
;
}
model
=
models
.
get
(
0
);
model
.
setAgentPublishStatus
(
AgentApplicationConstants
.
AGENT_PUBLISH_STATUS
.
UN_PUBLISH
);
this
.
repository
.
save
(
model
);
return
true
;
}
/**
/**
* 参数验证和转换 Entity To Model
* 参数验证和转换 Entity To Model
*
*
...
...
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