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
0f7b3735
Commit
0f7b3735
authored
Sep 13, 2024
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
真的吗?
parent
14a15b58
Hide whitespace changes
Inline
Side-by-side
Showing
53 changed files
with
4300 additions
and
532 deletions
+4300
-532
AgentApplicationInfoService.java
...nt_application/aggregate/AgentApplicationInfoService.java
+23
-0
AgentApplicationInfoServiceImpl.java
...ation/aggregate/impl/AgentApplicationInfoServiceImpl.java
+189
-0
AgentApplicationDialoguesRecordConstants.java
...on/constant/AgentApplicationDialoguesRecordConstants.java
+13
-0
AgentApplicationInfoConvert.java
...gent_application/convert/AgentApplicationInfoConvert.java
+44
-0
BizAgentApplicationDialoguesRecordConvert.java
...on/convert/BizAgentApplicationDialoguesRecordConvert.java
+81
-0
BizAgentApplicationLargeModelListConvert.java
...ion/convert/BizAgentApplicationLargeModelListConvert.java
+41
-0
BizAgentApplicationPublishConvert.java
...pplication/convert/BizAgentApplicationPublishConvert.java
+165
-0
AgentApplicationBaseInfo.java
...oc/agent_application/domain/AgentApplicationBaseInfo.java
+13
-0
AgentApplicationInfoSearchDto.java
.../agent_application/dto/AgentApplicationInfoSearchDto.java
+14
-0
AgentApplicationPreviewDto.java
...poc/agent_application/dto/AgentApplicationPreviewDto.java
+30
-0
BizAgentApplicationDialoguesRecordDto.java
...pplication/dto/BizAgentApplicationDialoguesRecordDto.java
+165
-0
BizAgentApplicationInfoDto.java
...poc/agent_application/dto/BizAgentApplicationInfoDto.java
+307
-0
BizAgentApplicationLargeModelListDto.java
...application/dto/BizAgentApplicationLargeModelListDto.java
+43
-0
BizAgentApplicationPublishDto.java
.../agent_application/dto/BizAgentApplicationPublishDto.java
+6
-0
BizAgentApplicationDialoguesRecordEntity.java
...tion/entity/BizAgentApplicationDialoguesRecordEntity.java
+166
-0
BizAgentApplicationInfoEntity.java
...ent_application/entity/BizAgentApplicationInfoEntity.java
+163
-200
BizAgentApplicationLargeModelListEntity.java
...ation/entity/BizAgentApplicationLargeModelListEntity.java
+43
-0
BizAgentApplicationPublishEntity.java
..._application/entity/BizAgentApplicationPublishEntity.java
+307
-0
BizAgentApplicationDialoguesRecordModel.java
...cation/model/BizAgentApplicationDialoguesRecordModel.java
+254
-0
BizAgentApplicationInfoModel.java
...agent_application/model/BizAgentApplicationInfoModel.java
+269
-277
BizAgentApplicationLargeModelListModel.java
...ication/model/BizAgentApplicationLargeModelListModel.java
+76
-0
BizAgentApplicationPublishModel.java
...nt_application/model/BizAgentApplicationPublishModel.java
+398
-0
AgentApplicationInfoQuery.sql
...poc/agent_application/query/AgentApplicationInfoQuery.sql
+32
-0
AgentApplicationInfoQueryCondition.java
...application/query/AgentApplicationInfoQueryCondition.java
+34
-0
AgentApplicationInfoQueryItem.java
...gent_application/query/AgentApplicationInfoQueryItem.java
+392
-0
BizAgentApplicationDialoguesRecordRepository.java
...ository/BizAgentApplicationDialoguesRecordRepository.java
+6
-0
BizAgentApplicationLargeModelListRepository.java
...pository/BizAgentApplicationLargeModelListRepository.java
+6
-0
BizAgentApplicationPublishRepository.java
...tion/repository/BizAgentApplicationPublishRepository.java
+6
-0
AgentApplicationInfoRest.java
.../poc/agent_application/rest/AgentApplicationInfoRest.java
+15
-2
BizAgentApplicationDialoguesRecordRest.java
...lication/rest/BizAgentApplicationDialoguesRecordRest.java
+24
-0
BizAgentApplicationPublishRest.java
...gent_application/rest/BizAgentApplicationPublishRest.java
+24
-0
AgentApplicationInfoRestImpl.java
...t_application/rest/impl/AgentApplicationInfoRestImpl.java
+74
-30
BizAgentApplicationDialoguesRecordRestImpl.java
...rest/impl/BizAgentApplicationDialoguesRecordRestImpl.java
+51
-0
BizAgentApplicationPublishRestImpl.java
...ication/rest/impl/BizAgentApplicationPublishRestImpl.java
+51
-0
BizAgentApplicationDialoguesRecordService.java
...on/service/BizAgentApplicationDialoguesRecordService.java
+24
-0
BizAgentApplicationInfoService.java
...t_application/service/BizAgentApplicationInfoService.java
+5
-0
BizAgentApplicationLargeModelListService.java
...ion/service/BizAgentApplicationLargeModelListService.java
+21
-0
BizAgentApplicationPublishService.java
...pplication/service/BizAgentApplicationPublishService.java
+25
-0
BizAgentApplicationDialoguesRecordServiceImpl.java
...e/impl/BizAgentApplicationDialoguesRecordServiceImpl.java
+119
-0
BizAgentApplicationInfoServiceImpl.java
...tion/service/impl/BizAgentApplicationInfoServiceImpl.java
+19
-1
BizAgentApplicationLargeModelListServiceImpl.java
...ce/impl/BizAgentApplicationLargeModelListServiceImpl.java
+79
-0
BizAgentApplicationPublishServiceImpl.java
...n/service/impl/BizAgentApplicationPublishServiceImpl.java
+180
-0
AgentApplicationService.java
.../cn/com/poc/expose/aggregate/AgentApplicationService.java
+14
-0
AgentApplicationServiceImpl.java
...oc/expose/aggregate/impl/AgentApplicationServiceImpl.java
+126
-0
AgentApplicationDto.java
src/main/java/cn/com/poc/expose/dto/AgentApplicationDto.java
+35
-0
AgentApplicationRest.java
...ain/java/cn/com/poc/expose/rest/AgentApplicationRest.java
+23
-2
AgentApplicationRestImpl.java
...cn/com/poc/expose/rest/impl/AgentApplicationRestImpl.java
+54
-6
MultiDomainOauthUserManagerImplementor.java
...ecurity/oauth/MultiDomainOauthUserManagerImplementor.java
+1
-1
Message.java
.../thirdparty/resource/demand/ai/common/domain/Message.java
+7
-10
MultiContent.java
...dparty/resource/demand/ai/common/domain/MultiContent.java
+13
-0
MultiContentEnum.java
...dparty/resource/demand/ai/constants/MultiContentEnum.java
+4
-0
ModelInfo.java
...m/poc/thirdparty/resource/demand/ai/entity/ModelInfo.java
+23
-0
LargeModelResponse.java
...ource/demand/ai/entity/largemodel/LargeModelResponse.java
+3
-3
No files found.
src/main/java/cn/com/poc/agent_application/aggregate/AgentApplicationInfoService.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
aggregate
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationInfoEntity
;
import
cn.com.poc.thirdparty.resource.demand.ai.common.domain.Message
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
public
interface
AgentApplicationInfoService
{
/**
* 更新并发布应用
*/
boolean
updateAndPublish
(
BizAgentApplicationInfoEntity
entity
)
throws
Exception
;
/**
* 应用预览
*/
String
callAgentApplication
(
String
largeModel
,
String
[]
unitIds
,
String
agentSystem
,
String
[]
knowledgeIds
,
Integer
communicationTurn
,
Float
topP
,
List
<
Message
>
messages
,
HttpServletResponse
httpServletResponse
)
throws
Exception
;
}
src/main/java/cn/com/poc/agent_application/aggregate/impl/AgentApplicationInfoServiceImpl.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
aggregate
.
impl
;
import
cn.com.poc.agent_application.aggregate.AgentApplicationInfoService
;
import
cn.com.poc.agent_application.constant.AgentApplicationConstants
;
import
cn.com.poc.agent_application.constant.AgentApplicationDialoguesRecordConstants
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationInfoEntity
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationPublishEntity
;
import
cn.com.poc.agent_application.service.BizAgentApplicationInfoService
;
import
cn.com.poc.agent_application.service.BizAgentApplicationPublishService
;
import
cn.com.poc.common.utils.BlContext
;
import
cn.com.poc.common.utils.JsonUtils
;
import
cn.com.poc.support.security.oauth.entity.UserBaseEntity
;
import
cn.com.poc.thirdparty.resource.demand.ai.aggregate.DemandKnowledgeService
;
import
cn.com.poc.thirdparty.resource.demand.ai.common.domain.Message
;
import
cn.com.poc.thirdparty.resource.demand.ai.common.domain.MultiContent
;
import
cn.com.poc.thirdparty.resource.demand.ai.entity.largemodel.LargeModelDemandResult
;
import
cn.com.poc.thirdparty.resource.demand.ai.entity.largemodel.LargeModelResponse
;
import
cn.com.poc.thirdparty.service.LLMService
;
import
cn.com.yict.framemax.core.exception.BusinessException
;
import
cn.hutool.core.bean.BeanUtil
;
import
org.apache.commons.lang.ArrayUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.BufferedReader
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
@Component
public
class
AgentApplicationInfoServiceImpl
implements
AgentApplicationInfoService
{
final
private
String
TEXT_EVENT_STREAM_CHARSET_UTF_8
=
"text/event-stream;charset=UTF-8"
;
final
private
String
EVENT_STREAM_PREFIX
=
"data: "
;
final
private
Logger
logger
=
LoggerFactory
.
getLogger
(
AgentApplicationInfoService
.
class
);
@Resource
private
BizAgentApplicationInfoService
bizAgentApplicationInfoService
;
@Resource
private
BizAgentApplicationPublishService
bizAgentApplicationPublishService
;
@Resource
private
DemandKnowledgeService
demandKnowledgeService
;
@Resource
private
LLMService
llmService
;
@Override
public
boolean
updateAndPublish
(
BizAgentApplicationInfoEntity
bizAgentApplicationInfoEntity
)
throws
Exception
{
UserBaseEntity
userBaseEntity
=
BlContext
.
getCurrentUserNotException
();
Long
userId
=
userBaseEntity
.
getUserId
();
bizAgentApplicationInfoEntity
.
setMemberId
(
userId
.
intValue
());
bizAgentApplicationInfoEntity
.
setAgentPublishStatus
(
AgentApplicationConstants
.
AGENT_PUBLISH_STATUS
.
PUBLISH
);
bizAgentApplicationInfoEntity
.
setPublishTime
(
new
Date
());
if
(
null
==
bizAgentApplicationInfoService
.
update
(
bizAgentApplicationInfoEntity
))
{
throw
new
BusinessException
(
"发布失败"
);
}
//发布应用
bizAgentApplicationPublishService
.
deleteByAgentId
(
bizAgentApplicationInfoEntity
.
getAgentId
());
BizAgentApplicationPublishEntity
publishEntity
=
new
BizAgentApplicationPublishEntity
();
BeanUtil
.
copyProperties
(
bizAgentApplicationInfoEntity
,
publishEntity
);
bizAgentApplicationPublishService
.
save
(
publishEntity
);
return
true
;
}
@Override
public
String
callAgentApplication
(
String
largeModel
,
String
[]
unitIds
,
String
agentSystem
,
String
[]
knowledgeIds
,
Integer
communicationTurn
,
Float
topP
,
List
<
Message
>
messages
,
HttpServletResponse
httpServletResponse
)
throws
Exception
{
logger
.
info
(
"--------- Call Agent Application large model:{},unitIds:{},agentSystem:{},knowledgeIds:{}"
+
" communicationTurn:{},topP:{},messages:{}--------------"
,
largeModel
,
unitIds
,
agentSystem
,
knowledgeIds
,
communicationTurn
,
topP
,
messages
);
//todo 调用组件
String
promptTemplate
=
buildDialogsPrompt
(
messages
,
agentSystem
,
knowledgeIds
);
Message
[]
messageArray
=
buildMessages
(
messages
,
communicationTurn
,
promptTemplate
);
BufferedReader
bufferedReader
=
invokeLLM
(
largeModel
,
messageArray
,
topP
);
return
textOutput
(
httpServletResponse
,
bufferedReader
);
}
private
String
buildDialogsPrompt
(
List
<
Message
>
messages
,
String
agentSystem
,
String
[]
knowledgeIds
)
{
// todo 获取提示词模板
String
promptTemplate
=
"${agentSystem}"
;
promptTemplate
=
promptTemplate
.
replace
(
"${agentSystem}"
,
StringUtils
.
isNotBlank
(
agentSystem
)
?
agentSystem
:
StringUtils
.
EMPTY
);
// 调用知识库
if
(
ArrayUtils
.
isNotEmpty
(
knowledgeIds
))
{
List
<
String
>
knowledgeResults
=
demandKnowledgeService
.
searchKnowledge
(
messages
.
get
(
messages
.
size
()
-
1
).
getContent
().
get
(
0
).
getText
(),
Arrays
.
stream
(
knowledgeIds
).
collect
(
Collectors
.
toList
()),
10
);
promptTemplate
=
promptTemplate
.
replace
(
"${knowledgeResults}"
,
knowledgeResults
.
toString
());
}
return
promptTemplate
;
}
/**
* * 调用llm
*
* @param largeModel
* @param messageArray
* @param topP
* @return
* @throws Exception
*/
private
BufferedReader
invokeLLM
(
String
largeModel
,
Message
[]
messageArray
,
Float
topP
)
throws
Exception
{
LargeModelResponse
largeModelResponse
=
new
LargeModelResponse
();
largeModelResponse
.
setModel
(
largeModel
);
largeModelResponse
.
setMessages
(
messageArray
);
largeModelResponse
.
setTopP
(
topP
);
largeModelResponse
.
setStream
(
true
);
largeModelResponse
.
setUser
(
"POE"
);
return
llmService
.
chatChunk
(
largeModelResponse
);
}
/**
* 文本输出结果
*
* @param httpServletResponse
* @param bufferedReader
* @throws IOException
*/
private
String
textOutput
(
HttpServletResponse
httpServletResponse
,
BufferedReader
bufferedReader
)
throws
IOException
{
String
res
=
""
;
httpServletResponse
.
setContentType
(
TEXT_EVENT_STREAM_CHARSET_UTF_8
);
PrintWriter
writer
=
httpServletResponse
.
getWriter
();
StringBuilder
output
=
new
StringBuilder
();
while
((
res
=
bufferedReader
.
readLine
())
!=
null
)
{
if
(
StringUtils
.
isNotBlank
(
res
))
{
LargeModelDemandResult
result
=
JsonUtils
.
deSerialize
(
res
.
replaceFirst
(
EVENT_STREAM_PREFIX
,
StringUtils
.
EMPTY
),
LargeModelDemandResult
.
class
);
if
(!
"0"
.
equals
(
result
.
getCode
()))
{
logger
.
error
(
"LLM Error,code:{}"
,
result
.
getCode
());
BusinessException
ex
=
new
BusinessException
(
"调用失败"
);
writer
.
write
(
EVENT_STREAM_PREFIX
+
JsonUtils
.
serialize
(
ex
)
+
"\n\n"
);
writer
.
flush
();
throw
ex
;
}
output
.
append
(
result
.
getMessage
());
writer
.
write
(
res
+
"\n\n"
);
writer
.
flush
();
}
}
writer
.
write
(
EVENT_STREAM_PREFIX
+
"[DONE]\n\n"
);
// 关闭资源
bufferedReader
.
close
();
writer
.
close
();
return
output
.
toString
();
}
/**
* 构建消息【大模型参数】
*
* @param messages
* @param communicationTurn
* @param promptTemplate
* @return
*/
private
static
Message
[]
buildMessages
(
List
<
Message
>
messages
,
Integer
communicationTurn
,
String
promptTemplate
)
{
int
messLength
=
messages
.
size
()
-
1
;
int
skip
=
communicationTurn
*
2
;
if
(
skip
<
messLength
)
{
messages
=
messages
.
subList
(
messLength
-
skip
,
messages
.
size
());
}
if
(
StringUtils
.
isNotBlank
(
promptTemplate
))
{
List
<
MultiContent
>
content
=
new
ArrayList
<>();
MultiContent
multiContent
=
new
MultiContent
();
multiContent
.
setText
(
promptTemplate
);
multiContent
.
setType
(
"text"
);
content
.
add
(
multiContent
);
Message
systemMessage
=
new
Message
();
systemMessage
.
setRole
(
AgentApplicationDialoguesRecordConstants
.
ROLE
.
SYSTEM
);
systemMessage
.
setContent
(
content
);
messages
.
add
(
0
,
systemMessage
);
}
return
messages
.
toArray
(
new
Message
[
0
]);
}
}
src/main/java/cn/com/poc/agent_application/constant/AgentApplicationDialoguesRecordConstants.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
constant
;
public
interface
AgentApplicationDialoguesRecordConstants
{
interface
ROLE
{
String
USER
=
"user"
;
// 用户
String
ASSISTANT
=
"assistant"
;
// 助手
String
SYSTEM
=
"system"
;
//提示词
}
}
src/main/java/cn/com/poc/agent_application/convert/AgentApplicationInfoConvert.java
View file @
0f7b3735
...
...
@@ -7,6 +7,7 @@ import cn.com.poc.agent_application.domain.AgentApplicationKnowledgeConfig;
import
cn.com.poc.agent_application.model.BizAgentApplicationInfoModel
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationInfoEntity
;
import
cn.com.poc.agent_application.dto.AgentApplicationInfoDto
;
import
cn.com.poc.agent_application.query.AgentApplicationInfoQueryItem
;
import
cn.com.poc.common.utils.JsonUtils
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.tencent.core.utils.JsonUtil
;
...
...
@@ -27,6 +28,7 @@ public class AgentApplicationInfoConvert {
entity
.
setAgentSystem
(
model
.
getAgentSystem
());
entity
.
setAgentPublishStatus
(
model
.
getAgentPublishStatus
());
entity
.
setPreamble
(
model
.
getPreamble
());
entity
.
setPublishTime
(
model
.
getPublishTime
());
if
(
StringUtils
.
isNotBlank
(
model
.
getFeaturedQuestions
()))
{
entity
.
setFeaturedQuestions
(
JsonUtils
.
deSerialize
(
model
.
getFeaturedQuestions
(),
String
[].
class
));
}
...
...
@@ -62,6 +64,7 @@ public class AgentApplicationInfoConvert {
model
.
setAgentSystem
(
entity
.
getAgentSystem
());
model
.
setAgentPublishStatus
(
entity
.
getAgentPublishStatus
());
model
.
setPreamble
(
entity
.
getPreamble
());
model
.
setPublishTime
(
entity
.
getPublishTime
());
if
(
ArrayUtils
.
isNotEmpty
(
entity
.
getFeaturedQuestions
()))
{
model
.
setFeaturedQuestions
(
JsonUtils
.
serialize
(
entity
.
getFeaturedQuestions
()));
}
...
...
@@ -96,6 +99,7 @@ public class AgentApplicationInfoConvert {
baseInfo
.
setAgentDesc
(
entity
.
getAgentDesc
());
baseInfo
.
setAgentSystem
(
entity
.
getAgentSystem
());
baseInfo
.
setAgentPublishStatus
(
entity
.
getAgentPublishStatus
());
baseInfo
.
setPublishTime
(
entity
.
getPublishTime
());
AgentApplicationCommConfig
commConfig
=
new
AgentApplicationCommConfig
();
commConfig
.
setPreamble
(
entity
.
getPreamble
());
...
...
@@ -128,12 +132,14 @@ public class AgentApplicationInfoConvert {
BizAgentApplicationInfoEntity
entity
=
new
BizAgentApplicationInfoEntity
();
if
(
ObjectUtil
.
isNotEmpty
(
dto
.
getBaseInfo
()))
{
entity
.
setAgentId
(
dto
.
getBaseInfo
().
getAgentId
());
entity
.
setMemberId
(
dto
.
getBaseInfo
().
getMemberId
());
entity
.
setAgentAvatar
(
dto
.
getBaseInfo
().
getAgentAvatar
());
entity
.
setMemberId
(
dto
.
getBaseInfo
().
getMemberId
());
entity
.
setAgentTitle
(
dto
.
getBaseInfo
().
getAgentTitle
());
entity
.
setAgentDesc
(
dto
.
getBaseInfo
().
getAgentDesc
());
entity
.
setAgentSystem
(
dto
.
getBaseInfo
().
getAgentSystem
());
entity
.
setAgentPublishStatus
(
dto
.
getBaseInfo
().
getAgentPublishStatus
());
entity
.
setPublishTime
(
dto
.
getBaseInfo
().
getPublishTime
());
}
if
(
ObjectUtil
.
isNotEmpty
(
dto
.
getCommConfig
()))
{
...
...
@@ -160,4 +166,42 @@ public class AgentApplicationInfoConvert {
entity
.
setModifiedTime
(
dto
.
getModifiedTime
());
return
entity
;
}
public
static
BizAgentApplicationInfoEntity
queryItemToEntity
(
AgentApplicationInfoQueryItem
infoQueryItem
)
{
BizAgentApplicationInfoEntity
entity
=
new
BizAgentApplicationInfoEntity
();
entity
.
setId
(
infoQueryItem
.
getId
());
entity
.
setMemberId
(
infoQueryItem
.
getMemberId
());
entity
.
setAgentId
(
infoQueryItem
.
getAgentId
());
entity
.
setAgentTitle
(
infoQueryItem
.
getAgentTitle
());
entity
.
setAgentDesc
(
infoQueryItem
.
getAgentDesc
());
entity
.
setAgentAvatar
(
infoQueryItem
.
getAgentAvatar
());
entity
.
setAgentSystem
(
infoQueryItem
.
getAgentSystem
());
entity
.
setAgentPublishStatus
(
infoQueryItem
.
getAgentPublishStatus
());
entity
.
setPreamble
(
infoQueryItem
.
getPreamble
());
entity
.
setPublishTime
(
infoQueryItem
.
getPublishTime
());
if
(
StringUtils
.
isNotBlank
(
infoQueryItem
.
getFeaturedQuestions
()))
{
entity
.
setFeaturedQuestions
(
JsonUtils
.
deSerialize
(
infoQueryItem
.
getFeaturedQuestions
(),
String
[].
class
));
}
entity
.
setCommunicationTurn
(
infoQueryItem
.
getCommunicationTurn
());
entity
.
setContinuousQuestionStatus
(
infoQueryItem
.
getContinuousQuestionStatus
());
entity
.
setContinuousQuestionSystem
(
infoQueryItem
.
getContinuousQuestionSystem
());
entity
.
setContinuousQuestionTurn
(
infoQueryItem
.
getContinuousQuestionTurn
());
if
(
StringUtils
.
isNotBlank
(
infoQueryItem
.
getKnowledgeIds
()))
{
entity
.
setKnowledgeIds
(
JsonUtils
.
deSerialize
(
infoQueryItem
.
getKnowledgeIds
(),
String
[].
class
));
}
entity
.
setLargeModel
(
infoQueryItem
.
getLargeModel
());
entity
.
setTopP
(
infoQueryItem
.
getTopP
());
if
(
StringUtils
.
isNotBlank
(
infoQueryItem
.
getUnitIds
()))
{
entity
.
setUnitIds
(
JsonUtils
.
deSerialize
(
infoQueryItem
.
getUnitIds
(),
String
[].
class
));
}
entity
.
setIsDeleted
(
infoQueryItem
.
getIsDeleted
());
entity
.
setCreator
(
infoQueryItem
.
getCreator
());
entity
.
setCreatedTime
(
infoQueryItem
.
getCreatedTime
());
entity
.
setModifier
(
infoQueryItem
.
getModifier
());
entity
.
setModifiedTime
(
infoQueryItem
.
getModifiedTime
());
entity
.
setSysVersion
(
infoQueryItem
.
getSysVersion
());
return
entity
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/convert/BizAgentApplicationDialoguesRecordConvert.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
convert
;
import
cn.com.poc.agent_application.model.BizAgentApplicationDialoguesRecordModel
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationDialoguesRecordEntity
;
import
cn.com.poc.agent_application.dto.BizAgentApplicationDialoguesRecordDto
;
public
class
BizAgentApplicationDialoguesRecordConvert
{
public
static
BizAgentApplicationDialoguesRecordEntity
modelToEntity
(
BizAgentApplicationDialoguesRecordModel
model
)
{
BizAgentApplicationDialoguesRecordEntity
entity
=
new
BizAgentApplicationDialoguesRecordEntity
();
entity
.
setId
(
model
.
getId
());
entity
.
setRole
(
model
.
getRole
());
entity
.
setAgentId
(
model
.
getAgentId
());
entity
.
setMemberId
(
model
.
getMemberId
());
entity
.
setContent
(
model
.
getContent
());
entity
.
setDialogsId
(
model
.
getDialogsId
());
entity
.
setTimestamp
(
model
.
getTimestamp
());
entity
.
setIsDeleted
(
model
.
getIsDeleted
());
entity
.
setCreator
(
model
.
getCreator
());
entity
.
setCreatedTime
(
model
.
getCreatedTime
());
entity
.
setModifier
(
model
.
getModifier
());
entity
.
setModifiedTime
(
model
.
getModifiedTime
());
entity
.
setSysVersion
(
model
.
getSysVersion
());
return
entity
;
}
public
static
BizAgentApplicationDialoguesRecordModel
entityToModel
(
BizAgentApplicationDialoguesRecordEntity
entity
)
{
BizAgentApplicationDialoguesRecordModel
model
=
new
BizAgentApplicationDialoguesRecordModel
();
model
.
setId
(
entity
.
getId
());
model
.
setRole
(
entity
.
getRole
());
model
.
setAgentId
(
entity
.
getAgentId
());
model
.
setMemberId
(
entity
.
getMemberId
());
model
.
setDialogsId
(
entity
.
getDialogsId
());
model
.
setContent
(
entity
.
getContent
());
model
.
setTimestamp
(
entity
.
getTimestamp
());
model
.
setIsDeleted
(
entity
.
getIsDeleted
());
model
.
setCreator
(
entity
.
getCreator
());
model
.
setCreatedTime
(
entity
.
getCreatedTime
());
model
.
setModifier
(
entity
.
getModifier
());
model
.
setModifiedTime
(
entity
.
getModifiedTime
());
model
.
setSysVersion
(
entity
.
getSysVersion
());
return
model
;
}
public
static
BizAgentApplicationDialoguesRecordDto
entityToDto
(
BizAgentApplicationDialoguesRecordEntity
entity
)
{
BizAgentApplicationDialoguesRecordDto
dto
=
new
BizAgentApplicationDialoguesRecordDto
();
dto
.
setId
(
entity
.
getId
());
dto
.
setRole
(
entity
.
getRole
());
dto
.
setDialogsId
(
entity
.
getDialogsId
());
dto
.
setAgentId
(
entity
.
getAgentId
());
dto
.
setMemberId
(
entity
.
getMemberId
());
dto
.
setContent
(
entity
.
getContent
());
dto
.
setTimestamp
(
entity
.
getTimestamp
());
dto
.
setIsDeleted
(
entity
.
getIsDeleted
());
dto
.
setCreator
(
entity
.
getCreator
());
dto
.
setCreatedTime
(
entity
.
getCreatedTime
());
dto
.
setModifier
(
entity
.
getModifier
());
dto
.
setModifiedTime
(
entity
.
getModifiedTime
());
dto
.
setSysVersion
(
entity
.
getSysVersion
());
return
dto
;
}
public
static
BizAgentApplicationDialoguesRecordEntity
dtoToEntity
(
BizAgentApplicationDialoguesRecordDto
dto
)
{
BizAgentApplicationDialoguesRecordEntity
entity
=
new
BizAgentApplicationDialoguesRecordEntity
();
entity
.
setId
(
dto
.
getId
());
entity
.
setRole
(
dto
.
getRole
());
entity
.
setAgentId
(
dto
.
getAgentId
());
entity
.
setDialogsId
(
dto
.
getDialogsId
());
entity
.
setMemberId
(
dto
.
getMemberId
());
entity
.
setContent
(
dto
.
getContent
());
entity
.
setTimestamp
(
dto
.
getTimestamp
());
entity
.
setIsDeleted
(
dto
.
getIsDeleted
());
entity
.
setCreator
(
dto
.
getCreator
());
entity
.
setCreatedTime
(
dto
.
getCreatedTime
());
entity
.
setModifier
(
dto
.
getModifier
());
entity
.
setModifiedTime
(
dto
.
getModifiedTime
());
entity
.
setSysVersion
(
dto
.
getSysVersion
());
return
entity
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/convert/BizAgentApplicationLargeModelListConvert.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
convert
;
import
cn.com.poc.agent_application.model.BizAgentApplicationLargeModelListModel
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationLargeModelListEntity
;
import
cn.com.poc.agent_application.dto.BizAgentApplicationLargeModelListDto
;
public
class
BizAgentApplicationLargeModelListConvert
{
public
static
BizAgentApplicationLargeModelListEntity
modelToEntity
(
BizAgentApplicationLargeModelListModel
model
){
BizAgentApplicationLargeModelListEntity
entity
=
new
BizAgentApplicationLargeModelListEntity
();
entity
.
setId
(
model
.
getId
());
entity
.
setModelName
(
model
.
getModelName
());
entity
.
setOwner
(
model
.
getOwner
());
return
entity
;
}
public
static
BizAgentApplicationLargeModelListModel
entityToModel
(
BizAgentApplicationLargeModelListEntity
entity
){
BizAgentApplicationLargeModelListModel
model
=
new
BizAgentApplicationLargeModelListModel
();
model
.
setId
(
entity
.
getId
());
model
.
setModelName
(
entity
.
getModelName
());
model
.
setOwner
(
entity
.
getOwner
());
return
model
;
}
public
static
BizAgentApplicationLargeModelListDto
entityToDto
(
BizAgentApplicationLargeModelListEntity
entity
){
BizAgentApplicationLargeModelListDto
dto
=
new
BizAgentApplicationLargeModelListDto
();
dto
.
setId
(
entity
.
getId
());
dto
.
setModelName
(
entity
.
getModelName
());
dto
.
setOwner
(
entity
.
getOwner
());
return
dto
;
}
public
static
BizAgentApplicationLargeModelListEntity
dtoToEntity
(
BizAgentApplicationLargeModelListDto
dto
){
BizAgentApplicationLargeModelListEntity
entity
=
new
BizAgentApplicationLargeModelListEntity
();
entity
.
setId
(
dto
.
getId
());
entity
.
setModelName
(
dto
.
getModelName
());
entity
.
setOwner
(
dto
.
getOwner
());
return
entity
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/convert/BizAgentApplicationPublishConvert.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
convert
;
import
cn.com.poc.agent_application.domain.AgentApplicationBaseInfo
;
import
cn.com.poc.agent_application.domain.AgentApplicationCommConfig
;
import
cn.com.poc.agent_application.domain.AgentApplicationCommModelConfig
;
import
cn.com.poc.agent_application.domain.AgentApplicationKnowledgeConfig
;
import
cn.com.poc.agent_application.dto.AgentApplicationInfoDto
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationInfoEntity
;
import
cn.com.poc.agent_application.model.BizAgentApplicationPublishModel
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationPublishEntity
;
import
cn.com.poc.agent_application.dto.BizAgentApplicationPublishDto
;
import
cn.com.poc.common.utils.JsonUtils
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.tencent.core.utils.JsonUtil
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.commons.lang3.StringUtils
;
public
class
BizAgentApplicationPublishConvert
{
public
static
BizAgentApplicationPublishEntity
modelToEntity
(
BizAgentApplicationPublishModel
model
){
BizAgentApplicationPublishEntity
entity
=
new
BizAgentApplicationPublishEntity
();
entity
.
setId
(
model
.
getId
());
entity
.
setMemberId
(
model
.
getMemberId
());
entity
.
setAgentId
(
model
.
getAgentId
());
entity
.
setAgentAvatar
(
model
.
getAgentAvatar
());
entity
.
setAgentTitle
(
model
.
getAgentTitle
());
entity
.
setAgentDesc
(
model
.
getAgentDesc
());
entity
.
setAgentSystem
(
model
.
getAgentSystem
());
entity
.
setPreamble
(
model
.
getPreamble
());
if
(
StringUtils
.
isNotBlank
(
model
.
getFeaturedQuestions
()))
{
entity
.
setFeaturedQuestions
(
JsonUtils
.
deSerialize
(
model
.
getFeaturedQuestions
(),
String
[].
class
));
}
entity
.
setCommunicationTurn
(
model
.
getCommunicationTurn
());
entity
.
setContinuousQuestionStatus
(
model
.
getContinuousQuestionStatus
());
entity
.
setContinuousQuestionSystem
(
model
.
getContinuousQuestionSystem
());
entity
.
setContinuousQuestionTurn
(
model
.
getContinuousQuestionTurn
());
if
(
StringUtils
.
isNotBlank
(
model
.
getKnowledgeIds
()))
{
entity
.
setKnowledgeIds
(
JsonUtils
.
deSerialize
(
model
.
getKnowledgeIds
(),
String
[].
class
));
}
entity
.
setLargeModel
(
model
.
getLargeModel
());
entity
.
setTopP
(
model
.
getTopP
());
if
(
StringUtils
.
isNotBlank
(
model
.
getUnitIds
()))
{
entity
.
setUnitIds
(
JsonUtils
.
deSerialize
(
model
.
getUnitIds
(),
String
[].
class
));
}
entity
.
setIsDeleted
(
model
.
getIsDeleted
());
entity
.
setCreator
(
model
.
getCreator
());
entity
.
setCreatedTime
(
model
.
getCreatedTime
());
entity
.
setModifier
(
model
.
getModifier
());
entity
.
setModifiedTime
(
model
.
getModifiedTime
());
entity
.
setSysVersion
(
model
.
getSysVersion
());
return
entity
;
}
public
static
BizAgentApplicationPublishModel
entityToModel
(
BizAgentApplicationPublishEntity
entity
){
BizAgentApplicationPublishModel
model
=
new
BizAgentApplicationPublishModel
();
model
.
setId
(
entity
.
getId
());
model
.
setMemberId
(
entity
.
getMemberId
());
model
.
setAgentId
(
entity
.
getAgentId
());
model
.
setAgentAvatar
(
entity
.
getAgentAvatar
());
model
.
setAgentTitle
(
entity
.
getAgentTitle
());
model
.
setAgentDesc
(
entity
.
getAgentDesc
());
model
.
setAgentSystem
(
entity
.
getAgentSystem
());
model
.
setPreamble
(
entity
.
getPreamble
());
if
(
ArrayUtils
.
isNotEmpty
(
entity
.
getFeaturedQuestions
()))
{
model
.
setFeaturedQuestions
(
JsonUtils
.
serialize
(
entity
.
getFeaturedQuestions
()));
}
model
.
setCommunicationTurn
(
entity
.
getCommunicationTurn
());
model
.
setContinuousQuestionStatus
(
entity
.
getContinuousQuestionStatus
());
model
.
setContinuousQuestionSystem
(
entity
.
getContinuousQuestionSystem
());
model
.
setContinuousQuestionTurn
(
entity
.
getContinuousQuestionTurn
());
if
(
ArrayUtils
.
isNotEmpty
(
entity
.
getKnowledgeIds
()))
{
model
.
setKnowledgeIds
(
JsonUtils
.
serialize
(
entity
.
getKnowledgeIds
()));
}
model
.
setLargeModel
(
entity
.
getLargeModel
());
model
.
setTopP
(
entity
.
getTopP
());
if
(
ArrayUtils
.
isNotEmpty
(
entity
.
getUnitIds
()))
{
model
.
setUnitIds
(
JsonUtil
.
toJson
(
entity
.
getUnitIds
()));
}
model
.
setIsDeleted
(
entity
.
getIsDeleted
());
model
.
setCreator
(
entity
.
getCreator
());
model
.
setCreatedTime
(
entity
.
getCreatedTime
());
model
.
setModifier
(
entity
.
getModifier
());
model
.
setModifiedTime
(
entity
.
getModifiedTime
());
model
.
setSysVersion
(
entity
.
getSysVersion
());
return
model
;
}
public
static
BizAgentApplicationPublishDto
entityToDto
(
BizAgentApplicationPublishEntity
entity
){
BizAgentApplicationPublishDto
dto
=
new
BizAgentApplicationPublishDto
();
AgentApplicationBaseInfo
baseInfo
=
new
AgentApplicationBaseInfo
();
baseInfo
.
setMemberId
(
entity
.
getMemberId
());
baseInfo
.
setAgentId
(
entity
.
getAgentId
());
baseInfo
.
setAgentTitle
(
entity
.
getAgentTitle
());
baseInfo
.
setAgentAvatar
(
entity
.
getAgentAvatar
());
baseInfo
.
setAgentDesc
(
entity
.
getAgentDesc
());
baseInfo
.
setAgentSystem
(
entity
.
getAgentSystem
());
baseInfo
.
setAgentPublishStatus
(
entity
.
getAgentPublishStatus
());
baseInfo
.
setPublishTime
(
entity
.
getPublishTime
());
AgentApplicationCommConfig
commConfig
=
new
AgentApplicationCommConfig
();
commConfig
.
setPreamble
(
entity
.
getPreamble
());
commConfig
.
setFeaturedQuestions
(
entity
.
getFeaturedQuestions
());
commConfig
.
setContinuousQuestionStatus
(
entity
.
getContinuousQuestionStatus
());
commConfig
.
setContinuousQuestionSystem
(
entity
.
getContinuousQuestionSystem
());
commConfig
.
setContinuousQuestionTurn
(
entity
.
getContinuousQuestionTurn
());
AgentApplicationKnowledgeConfig
knowledgeConfig
=
new
AgentApplicationKnowledgeConfig
();
knowledgeConfig
.
setKnowledgeIds
(
entity
.
getKnowledgeIds
());
AgentApplicationCommModelConfig
commModelConfig
=
new
AgentApplicationCommModelConfig
();
commModelConfig
.
setLargeModel
(
entity
.
getLargeModel
());
commModelConfig
.
setTopP
(
entity
.
getTopP
());
commModelConfig
.
setCommunicationTurn
(
entity
.
getCommunicationTurn
());
dto
.
setBaseInfo
(
baseInfo
);
dto
.
setCommConfig
(
commConfig
);
dto
.
setKnowledgeConfig
(
knowledgeConfig
);
dto
.
setCommModelConfig
(
commModelConfig
);
dto
.
setUnitIds
(
entity
.
getUnitIds
());
dto
.
setCreator
(
entity
.
getCreator
());
dto
.
setCreatedTime
(
entity
.
getCreatedTime
());
dto
.
setModifiedTime
(
entity
.
getModifiedTime
());
return
dto
;
}
public
static
BizAgentApplicationPublishEntity
dtoToEntity
(
BizAgentApplicationPublishDto
dto
){
BizAgentApplicationPublishEntity
entity
=
new
BizAgentApplicationPublishEntity
();
if
(
ObjectUtil
.
isNotEmpty
(
dto
.
getBaseInfo
()))
{
entity
.
setAgentId
(
dto
.
getBaseInfo
().
getAgentId
());
entity
.
setMemberId
(
dto
.
getBaseInfo
().
getMemberId
());
entity
.
setAgentAvatar
(
dto
.
getBaseInfo
().
getAgentAvatar
());
entity
.
setMemberId
(
dto
.
getBaseInfo
().
getMemberId
());
entity
.
setAgentTitle
(
dto
.
getBaseInfo
().
getAgentTitle
());
entity
.
setAgentDesc
(
dto
.
getBaseInfo
().
getAgentDesc
());
entity
.
setAgentSystem
(
dto
.
getBaseInfo
().
getAgentSystem
());
entity
.
setAgentPublishStatus
(
dto
.
getBaseInfo
().
getAgentPublishStatus
());
entity
.
setPublishTime
(
dto
.
getBaseInfo
().
getPublishTime
());
}
if
(
ObjectUtil
.
isNotEmpty
(
dto
.
getCommConfig
()))
{
entity
.
setPreamble
(
dto
.
getCommConfig
().
getPreamble
());
entity
.
setFeaturedQuestions
(
dto
.
getCommConfig
().
getFeaturedQuestions
());
entity
.
setCommunicationTurn
(
dto
.
getCommConfig
().
getContinuousQuestionTurn
());
entity
.
setContinuousQuestionStatus
(
dto
.
getCommConfig
().
getContinuousQuestionStatus
());
entity
.
setContinuousQuestionSystem
(
dto
.
getCommConfig
().
getContinuousQuestionSystem
());
entity
.
setContinuousQuestionTurn
(
dto
.
getCommConfig
().
getContinuousQuestionTurn
());
}
if
(
ObjectUtil
.
isNotEmpty
(
dto
.
getKnowledgeConfig
()))
{
entity
.
setKnowledgeIds
(
dto
.
getKnowledgeConfig
().
getKnowledgeIds
());
}
if
(
ObjectUtil
.
isNotEmpty
(
dto
.
getCommModelConfig
()))
{
entity
.
setLargeModel
(
dto
.
getCommModelConfig
().
getLargeModel
());
entity
.
setTopP
(
dto
.
getCommModelConfig
().
getTopP
());
}
entity
.
setUnitIds
(
dto
.
getUnitIds
());
entity
.
setCreator
(
dto
.
getCreator
());
entity
.
setCreatedTime
(
dto
.
getCreatedTime
());
entity
.
setModifiedTime
(
dto
.
getModifiedTime
());
return
entity
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/domain/AgentApplicationBaseInfo.java
View file @
0f7b3735
...
...
@@ -103,4 +103,17 @@ public class AgentApplicationBaseInfo {
public
void
setAgentPublishStatus
(
java
.
lang
.
String
agentPublishStatus
)
{
this
.
agentPublishStatus
=
agentPublishStatus
;
}
/** publish_time
*发布时间
*/
private
java
.
util
.
Date
publishTime
;
public
java
.
util
.
Date
getPublishTime
(){
return
this
.
publishTime
;
}
public
void
setPublishTime
(
java
.
util
.
Date
publishTime
){
this
.
publishTime
=
publishTime
;
}
}
src/main/java/cn/com/poc/agent_application/dto/AgentApplicationInfoSearchDto.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
dto
;
public
class
AgentApplicationInfoSearchDto
{
private
String
query
;
public
String
getQuery
()
{
return
query
;
}
public
void
setQuery
(
String
query
)
{
this
.
query
=
query
;
}
}
src/main/java/cn/com/poc/agent_application/dto/AgentApplicationPreviewDto.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
dto
;
import
cn.com.poc.thirdparty.resource.demand.ai.common.domain.Message
;
import
java.io.Serializable
;
import
java.util.List
;
public
class
AgentApplicationPreviewDto
implements
Serializable
{
private
String
agentId
;
private
List
<
Message
>
messages
;
public
String
getAgentId
()
{
return
agentId
;
}
public
void
setAgentId
(
String
agentId
)
{
this
.
agentId
=
agentId
;
}
public
List
<
Message
>
getMessages
()
{
return
messages
;
}
public
void
setMessages
(
List
<
Message
>
messages
)
{
this
.
messages
=
messages
;
}
}
src/main/java/cn/com/poc/agent_application/dto/BizAgentApplicationDialoguesRecordDto.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
dto
;
public
class
BizAgentApplicationDialoguesRecordDto
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*主键ID
*/
private
java
.
lang
.
Long
id
;
public
java
.
lang
.
Long
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Long
id
){
this
.
id
=
id
;
}
/** role
*角色 user-用户 assistant-助手
*/
private
java
.
lang
.
String
role
;
public
java
.
lang
.
String
getRole
(){
return
this
.
role
;
}
public
void
setRole
(
java
.
lang
.
String
role
){
this
.
role
=
role
;
}
/** agent_id
*agent应用ID
*/
private
java
.
lang
.
String
agentId
;
public
java
.
lang
.
String
getAgentId
(){
return
this
.
agentId
;
}
public
void
setAgentId
(
java
.
lang
.
String
agentId
){
this
.
agentId
=
agentId
;
}
/** member_id
*用户ID
*/
private
java
.
lang
.
Long
memberId
;
public
java
.
lang
.
Long
getMemberId
(){
return
this
.
memberId
;
}
public
void
setMemberId
(
java
.
lang
.
Long
memberId
){
this
.
memberId
=
memberId
;
}
/** dialogsId
*对话ID
*/
private
java
.
lang
.
String
dialogsId
;
public
String
getDialogsId
()
{
return
dialogsId
;
}
public
void
setDialogsId
(
String
dialogsId
)
{
this
.
dialogsId
=
dialogsId
;
}
/** content
*内容
*/
private
java
.
lang
.
String
content
;
public
java
.
lang
.
String
getContent
(){
return
this
.
content
;
}
public
void
setContent
(
java
.
lang
.
String
content
){
this
.
content
=
content
;
}
/** timestamp
*时间戳
*/
private
java
.
lang
.
Long
timestamp
;
public
java
.
lang
.
Long
getTimestamp
(){
return
this
.
timestamp
;
}
public
void
setTimestamp
(
java
.
lang
.
Long
timestamp
){
this
.
timestamp
=
timestamp
;
}
/** is_deleted
*是否删除 1、Y 是 2、N 否
*/
private
java
.
lang
.
String
isDeleted
;
public
java
.
lang
.
String
getIsDeleted
(){
return
this
.
isDeleted
;
}
public
void
setIsDeleted
(
java
.
lang
.
String
isDeleted
){
this
.
isDeleted
=
isDeleted
;
}
/** CREATOR
*创建人
*/
private
java
.
lang
.
String
creator
;
public
java
.
lang
.
String
getCreator
(){
return
this
.
creator
;
}
public
void
setCreator
(
java
.
lang
.
String
creator
){
this
.
creator
=
creator
;
}
/** CREATED_TIME
*创建时间
*/
private
java
.
util
.
Date
createdTime
;
public
java
.
util
.
Date
getCreatedTime
(){
return
this
.
createdTime
;
}
public
void
setCreatedTime
(
java
.
util
.
Date
createdTime
){
this
.
createdTime
=
createdTime
;
}
/** MODIFIER
*修改人
*/
private
java
.
lang
.
String
modifier
;
public
java
.
lang
.
String
getModifier
(){
return
this
.
modifier
;
}
public
void
setModifier
(
java
.
lang
.
String
modifier
){
this
.
modifier
=
modifier
;
}
/** MODIFIED_TIME
*修改时间
*/
private
java
.
util
.
Date
modifiedTime
;
public
java
.
util
.
Date
getModifiedTime
(){
return
this
.
modifiedTime
;
}
public
void
setModifiedTime
(
java
.
util
.
Date
modifiedTime
){
this
.
modifiedTime
=
modifiedTime
;
}
/** SYS_VERSION
*乐观锁,版本号
*/
private
java
.
lang
.
Integer
sysVersion
;
public
java
.
lang
.
Integer
getSysVersion
(){
return
this
.
sysVersion
;
}
public
void
setSysVersion
(
java
.
lang
.
Integer
sysVersion
){
this
.
sysVersion
=
sysVersion
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/dto/BizAgentApplicationInfoDto.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
dto
;
public
class
BizAgentApplicationInfoDto
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*自增ID
*/
private
java
.
lang
.
Integer
id
;
public
java
.
lang
.
Integer
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Integer
id
){
this
.
id
=
id
;
}
/** member_id
*创建应用的用户ID
*/
private
java
.
lang
.
Integer
memberId
;
public
java
.
lang
.
Integer
getMemberId
(){
return
this
.
memberId
;
}
public
void
setMemberId
(
java
.
lang
.
Integer
memberId
){
this
.
memberId
=
memberId
;
}
/** agent_id
*agent应用ID
*/
private
java
.
lang
.
String
agentId
;
public
java
.
lang
.
String
getAgentId
(){
return
this
.
agentId
;
}
public
void
setAgentId
(
java
.
lang
.
String
agentId
){
this
.
agentId
=
agentId
;
}
/** agent_avatar
*应用头像ICON地址
*/
private
java
.
lang
.
String
agentAvatar
;
public
java
.
lang
.
String
getAgentAvatar
(){
return
this
.
agentAvatar
;
}
public
void
setAgentAvatar
(
java
.
lang
.
String
agentAvatar
){
this
.
agentAvatar
=
agentAvatar
;
}
/** agent_title
*应用标题
*/
private
java
.
lang
.
String
agentTitle
;
public
java
.
lang
.
String
getAgentTitle
(){
return
this
.
agentTitle
;
}
public
void
setAgentTitle
(
java
.
lang
.
String
agentTitle
){
this
.
agentTitle
=
agentTitle
;
}
/** agent_desc
*应用描述
*/
private
java
.
lang
.
String
agentDesc
;
public
java
.
lang
.
String
getAgentDesc
(){
return
this
.
agentDesc
;
}
public
void
setAgentDesc
(
java
.
lang
.
String
agentDesc
){
this
.
agentDesc
=
agentDesc
;
}
/** agent_system
*角色指令
*/
private
java
.
lang
.
String
agentSystem
;
public
java
.
lang
.
String
getAgentSystem
(){
return
this
.
agentSystem
;
}
public
void
setAgentSystem
(
java
.
lang
.
String
agentSystem
){
this
.
agentSystem
=
agentSystem
;
}
/** agent_publish_status
*应用发布状态 草稿-draft 发布-publish
*/
private
java
.
lang
.
String
agentPublishStatus
;
public
java
.
lang
.
String
getAgentPublishStatus
(){
return
this
.
agentPublishStatus
;
}
public
void
setAgentPublishStatus
(
java
.
lang
.
String
agentPublishStatus
){
this
.
agentPublishStatus
=
agentPublishStatus
;
}
/** publish_time
*发布时间
*/
private
java
.
util
.
Date
publishTime
;
public
java
.
util
.
Date
getPublishTime
(){
return
this
.
publishTime
;
}
public
void
setPublishTime
(
java
.
util
.
Date
publishTime
){
this
.
publishTime
=
publishTime
;
}
/** preamble
*开场白
*/
private
java
.
lang
.
String
preamble
;
public
java
.
lang
.
String
getPreamble
(){
return
this
.
preamble
;
}
public
void
setPreamble
(
java
.
lang
.
String
preamble
){
this
.
preamble
=
preamble
;
}
/** featured_questions
*推荐问
*/
private
java
.
lang
.
String
featuredQuestions
;
public
java
.
lang
.
String
getFeaturedQuestions
(){
return
this
.
featuredQuestions
;
}
public
void
setFeaturedQuestions
(
java
.
lang
.
String
featuredQuestions
){
this
.
featuredQuestions
=
featuredQuestions
;
}
/** communication_turn
*对话上下文保存轮次 0-100
*/
private
java
.
lang
.
Integer
communicationTurn
;
public
java
.
lang
.
Integer
getCommunicationTurn
(){
return
this
.
communicationTurn
;
}
public
void
setCommunicationTurn
(
java
.
lang
.
Integer
communicationTurn
){
this
.
communicationTurn
=
communicationTurn
;
}
/** continuous_question_status
*追问状态 默认-default 自定义-customizable 关闭-close
*/
private
java
.
lang
.
String
continuousQuestionStatus
;
public
java
.
lang
.
String
getContinuousQuestionStatus
(){
return
this
.
continuousQuestionStatus
;
}
public
void
setContinuousQuestionStatus
(
java
.
lang
.
String
continuousQuestionStatus
){
this
.
continuousQuestionStatus
=
continuousQuestionStatus
;
}
/** continuous_question_system
*追问prompt
*/
private
java
.
lang
.
String
continuousQuestionSystem
;
public
java
.
lang
.
String
getContinuousQuestionSystem
(){
return
this
.
continuousQuestionSystem
;
}
public
void
setContinuousQuestionSystem
(
java
.
lang
.
String
continuousQuestionSystem
){
this
.
continuousQuestionSystem
=
continuousQuestionSystem
;
}
/** continuous_question_turn
*追问轮次 1-5
*/
private
java
.
lang
.
Integer
continuousQuestionTurn
;
public
java
.
lang
.
Integer
getContinuousQuestionTurn
(){
return
this
.
continuousQuestionTurn
;
}
public
void
setContinuousQuestionTurn
(
java
.
lang
.
Integer
continuousQuestionTurn
){
this
.
continuousQuestionTurn
=
continuousQuestionTurn
;
}
/** knowledge_ids
*知识库ID
*/
private
java
.
lang
.
String
knowledgeIds
;
public
java
.
lang
.
String
getKnowledgeIds
(){
return
this
.
knowledgeIds
;
}
public
void
setKnowledgeIds
(
java
.
lang
.
String
knowledgeIds
){
this
.
knowledgeIds
=
knowledgeIds
;
}
/** large_model
*问答模型
*/
private
java
.
lang
.
String
largeModel
;
public
java
.
lang
.
String
getLargeModel
(){
return
this
.
largeModel
;
}
public
void
setLargeModel
(
java
.
lang
.
String
largeModel
){
this
.
largeModel
=
largeModel
;
}
/** top_p
*对话模型 多样性 [0-1.00]
*/
private
java
.
lang
.
Long
topP
;
public
java
.
lang
.
Long
getTopP
(){
return
this
.
topP
;
}
public
void
setTopP
(
java
.
lang
.
Long
topP
){
this
.
topP
=
topP
;
}
/** unit_ids
*组件ID
*/
private
java
.
lang
.
String
unitIds
;
public
java
.
lang
.
String
getUnitIds
(){
return
this
.
unitIds
;
}
public
void
setUnitIds
(
java
.
lang
.
String
unitIds
){
this
.
unitIds
=
unitIds
;
}
/** is_deleted
*是否删除 1、Y 是 2、N 否
*/
private
java
.
lang
.
String
isDeleted
;
public
java
.
lang
.
String
getIsDeleted
(){
return
this
.
isDeleted
;
}
public
void
setIsDeleted
(
java
.
lang
.
String
isDeleted
){
this
.
isDeleted
=
isDeleted
;
}
/** CREATOR
*创建人
*/
private
java
.
lang
.
String
creator
;
public
java
.
lang
.
String
getCreator
(){
return
this
.
creator
;
}
public
void
setCreator
(
java
.
lang
.
String
creator
){
this
.
creator
=
creator
;
}
/** CREATED_TIME
*创建时间
*/
private
java
.
util
.
Date
createdTime
;
public
java
.
util
.
Date
getCreatedTime
(){
return
this
.
createdTime
;
}
public
void
setCreatedTime
(
java
.
util
.
Date
createdTime
){
this
.
createdTime
=
createdTime
;
}
/** MODIFIER
*修改人
*/
private
java
.
lang
.
String
modifier
;
public
java
.
lang
.
String
getModifier
(){
return
this
.
modifier
;
}
public
void
setModifier
(
java
.
lang
.
String
modifier
){
this
.
modifier
=
modifier
;
}
/** MODIFIED_TIME
*修改时间
*/
private
java
.
util
.
Date
modifiedTime
;
public
java
.
util
.
Date
getModifiedTime
(){
return
this
.
modifiedTime
;
}
public
void
setModifiedTime
(
java
.
util
.
Date
modifiedTime
){
this
.
modifiedTime
=
modifiedTime
;
}
/** SYS_VERSION
*乐观锁,版本号
*/
private
java
.
lang
.
Integer
sysVersion
;
public
java
.
lang
.
Integer
getSysVersion
(){
return
this
.
sysVersion
;
}
public
void
setSysVersion
(
java
.
lang
.
Integer
sysVersion
){
this
.
sysVersion
=
sysVersion
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/dto/BizAgentApplicationLargeModelListDto.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
dto
;
public
class
BizAgentApplicationLargeModelListDto
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*
*/
private
java
.
lang
.
Integer
id
;
public
java
.
lang
.
Integer
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Integer
id
){
this
.
id
=
id
;
}
/** model_name
*模型
*/
private
java
.
lang
.
String
modelName
;
public
java
.
lang
.
String
getModelName
(){
return
this
.
modelName
;
}
public
void
setModelName
(
java
.
lang
.
String
modelName
){
this
.
modelName
=
modelName
;
}
/** owner
*模型服务商
*/
private
java
.
lang
.
String
owner
;
public
java
.
lang
.
String
getOwner
(){
return
this
.
owner
;
}
public
void
setOwner
(
java
.
lang
.
String
owner
){
this
.
owner
=
owner
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/dto/BizAgentApplicationPublishDto.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
dto
;
public
class
BizAgentApplicationPublishDto
extends
AgentApplicationInfoDto
{
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/entity/BizAgentApplicationDialoguesRecordEntity.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
entity
;
public
class
BizAgentApplicationDialoguesRecordEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*主键ID
*/
private
java
.
lang
.
Long
id
;
public
java
.
lang
.
Long
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Long
id
){
this
.
id
=
id
;
}
/** role
*角色 user-用户 assistant-助手
*/
private
java
.
lang
.
String
role
;
public
java
.
lang
.
String
getRole
(){
return
this
.
role
;
}
public
void
setRole
(
java
.
lang
.
String
role
){
this
.
role
=
role
;
}
/** agent_id
*agent应用ID
*/
private
java
.
lang
.
String
agentId
;
public
java
.
lang
.
String
getAgentId
(){
return
this
.
agentId
;
}
public
void
setAgentId
(
java
.
lang
.
String
agentId
){
this
.
agentId
=
agentId
;
}
/** member_id
*用户ID
*/
private
java
.
lang
.
Long
memberId
;
public
java
.
lang
.
Long
getMemberId
(){
return
this
.
memberId
;
}
public
void
setMemberId
(
java
.
lang
.
Long
memberId
){
this
.
memberId
=
memberId
;
}
/** content
*内容
*/
private
java
.
lang
.
String
content
;
public
java
.
lang
.
String
getContent
(){
return
this
.
content
;
}
public
void
setContent
(
java
.
lang
.
String
content
){
this
.
content
=
content
;
}
/** dialogsId
*对话ID
*/
private
java
.
lang
.
String
dialogsId
;
public
java
.
lang
.
String
getDialogsId
(){
return
this
.
dialogsId
;
}
public
void
setDialogsId
(
java
.
lang
.
String
dialogsId
){
this
.
dialogsId
=
dialogsId
;
}
/** timestamp
*时间戳
*/
private
java
.
lang
.
Long
timestamp
;
public
java
.
lang
.
Long
getTimestamp
(){
return
this
.
timestamp
;
}
public
void
setTimestamp
(
java
.
lang
.
Long
timestamp
){
this
.
timestamp
=
timestamp
;
}
/** is_deleted
*是否删除 1、Y 是 2、N 否
*/
private
java
.
lang
.
String
isDeleted
;
public
java
.
lang
.
String
getIsDeleted
(){
return
this
.
isDeleted
;
}
public
void
setIsDeleted
(
java
.
lang
.
String
isDeleted
){
this
.
isDeleted
=
isDeleted
;
}
/** CREATOR
*创建人
*/
private
java
.
lang
.
String
creator
;
public
java
.
lang
.
String
getCreator
(){
return
this
.
creator
;
}
public
void
setCreator
(
java
.
lang
.
String
creator
){
this
.
creator
=
creator
;
}
/** CREATED_TIME
*创建时间
*/
private
java
.
util
.
Date
createdTime
;
public
java
.
util
.
Date
getCreatedTime
(){
return
this
.
createdTime
;
}
public
void
setCreatedTime
(
java
.
util
.
Date
createdTime
){
this
.
createdTime
=
createdTime
;
}
/** MODIFIER
*修改人
*/
private
java
.
lang
.
String
modifier
;
public
java
.
lang
.
String
getModifier
(){
return
this
.
modifier
;
}
public
void
setModifier
(
java
.
lang
.
String
modifier
){
this
.
modifier
=
modifier
;
}
/** MODIFIED_TIME
*修改时间
*/
private
java
.
util
.
Date
modifiedTime
;
public
java
.
util
.
Date
getModifiedTime
(){
return
this
.
modifiedTime
;
}
public
void
setModifiedTime
(
java
.
util
.
Date
modifiedTime
){
this
.
modifiedTime
=
modifiedTime
;
}
/** SYS_VERSION
*乐观锁,版本号
*/
private
java
.
lang
.
Integer
sysVersion
;
public
java
.
lang
.
Integer
getSysVersion
(){
return
this
.
sysVersion
;
}
public
void
setSysVersion
(
java
.
lang
.
Integer
sysVersion
){
this
.
sysVersion
=
sysVersion
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/entity/BizAgentApplicationInfoEntity.java
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
entity
;
package
cn
.
com
.
poc
.
agent_application
.
entity
;
import
javax.persistence.Column
;
public
class
BizAgentApplicationInfoEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* id
* 自增ID
*/
/** id
*自增ID
*/
private
java
.
lang
.
Integer
id
;
public
java
.
lang
.
Integer
getId
()
{
public
java
.
lang
.
Integer
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Integer
id
)
{
public
void
setId
(
java
.
lang
.
Integer
id
){
this
.
id
=
id
;
}
/**
* member_id
* 创建应用的用户ID
*/
/** member_id
*创建应用的用户ID
*/
private
java
.
lang
.
Integer
memberId
;
public
Integer
getMemberId
()
{
return
memberId
;
public
java
.
lang
.
Integer
getMemberId
()
{
return
this
.
memberId
;
}
public
void
setMemberId
(
Integer
memberId
)
{
public
void
setMemberId
(
java
.
lang
.
Integer
memberId
)
{
this
.
memberId
=
memberId
;
}
/**
* agent_id
* agent应用ID
*/
/** agent_id
*agent应用ID
*/
private
java
.
lang
.
String
agentId
;
public
java
.
lang
.
String
getAgentId
()
{
public
java
.
lang
.
String
getAgentId
(){
return
this
.
agentId
;
}
public
void
setAgentId
(
java
.
lang
.
String
agentId
)
{
public
void
setAgentId
(
java
.
lang
.
String
agentId
){
this
.
agentId
=
agentId
;
}
/**
* agent_title
* 应用标题
*/
private
java
.
lang
.
String
agentTitle
;
public
java
.
lang
.
String
getAgentTitle
()
{
return
this
.
agentTitle
;
}
public
void
setAgentTitle
(
java
.
lang
.
String
agentTitle
)
{
this
.
agentTitle
=
agentTitle
;
}
/**
* agent_avatar
* 应用头像URL
*/
/** agent_avatar
*应用头像ICON地址
*/
private
java
.
lang
.
String
agentAvatar
;
public
java
.
lang
.
String
getAgentAvatar
()
{
public
java
.
lang
.
String
getAgentAvatar
(){
return
this
.
agentAvatar
;
}
public
void
setAgentAvatar
(
java
.
lang
.
String
agentAvatar
)
{
public
void
setAgentAvatar
(
java
.
lang
.
String
agentAvatar
){
this
.
agentAvatar
=
agentAvatar
;
}
/** agent_title
*应用标题
*/
private
java
.
lang
.
String
agentTitle
;
/**
* agent_desc
* 应用描述
*/
public
java
.
lang
.
String
getAgentTitle
(){
return
this
.
agentTitle
;
}
public
void
setAgentTitle
(
java
.
lang
.
String
agentTitle
){
this
.
agentTitle
=
agentTitle
;
}
/** agent_desc
*应用描述
*/
private
java
.
lang
.
String
agentDesc
;
public
java
.
lang
.
String
getAgentDesc
()
{
public
java
.
lang
.
String
getAgentDesc
(){
return
this
.
agentDesc
;
}
public
void
setAgentDesc
(
java
.
lang
.
String
agentDesc
)
{
public
void
setAgentDesc
(
java
.
lang
.
String
agentDesc
){
this
.
agentDesc
=
agentDesc
;
}
/**
* agent_system
* 角色指令
*/
/** agent_system
*角色指令
*/
private
java
.
lang
.
String
agentSystem
;
public
java
.
lang
.
String
getAgentSystem
()
{
public
java
.
lang
.
String
getAgentSystem
(){
return
this
.
agentSystem
;
}
public
void
setAgentSystem
(
java
.
lang
.
String
agentSystem
)
{
public
void
setAgentSystem
(
java
.
lang
.
String
agentSystem
){
this
.
agentSystem
=
agentSystem
;
}
/**
* agent_publish_status
* 应用发布状态 草稿-draft 发布-publish
*/
/** agent_publish_status
*应用发布状态 草稿-draft 发布-publish
*/
private
java
.
lang
.
String
agentPublishStatus
;
public
java
.
lang
.
String
getAgentPublishStatus
()
{
public
java
.
lang
.
String
getAgentPublishStatus
(){
return
this
.
agentPublishStatus
;
}
public
void
setAgentPublishStatus
(
java
.
lang
.
String
agentPublishStatus
)
{
public
void
setAgentPublishStatus
(
java
.
lang
.
String
agentPublishStatus
){
this
.
agentPublishStatus
=
agentPublishStatus
;
}
/** publish_time
*发布时间
*/
private
java
.
util
.
Date
publishTime
;
/**
* preamble
* 开场白
*/
public
java
.
util
.
Date
getPublishTime
(){
return
this
.
publishTime
;
}
public
void
setPublishTime
(
java
.
util
.
Date
publishTime
){
this
.
publishTime
=
publishTime
;
}
/** preamble
*开场白
*/
private
java
.
lang
.
String
preamble
;
public
java
.
lang
.
String
getPreamble
()
{
public
java
.
lang
.
String
getPreamble
(){
return
this
.
preamble
;
}
public
void
setPreamble
(
java
.
lang
.
String
preamble
)
{
public
void
setPreamble
(
java
.
lang
.
String
preamble
){
this
.
preamble
=
preamble
;
}
/**
* featured_questions
* 推荐问
*/
/** featured_questions
*推荐问
*/
private
java
.
lang
.
String
[]
featuredQuestions
;
public
java
.
lang
.
String
[]
getFeaturedQuestions
()
{
public
java
.
lang
.
String
[]
getFeaturedQuestions
(){
return
this
.
featuredQuestions
;
}
public
void
setFeaturedQuestions
(
java
.
lang
.
String
[]
featuredQuestions
)
{
public
void
setFeaturedQuestions
(
java
.
lang
.
String
[]
featuredQuestions
){
this
.
featuredQuestions
=
featuredQuestions
;
}
/**
* communication_turn
* 对话上下文保存轮次
*/
/** communication_turn
*对话上下文保存轮次 0-100
*/
private
java
.
lang
.
Integer
communicationTurn
;
public
java
.
lang
.
Integer
getCommunicationTurn
()
{
public
java
.
lang
.
Integer
getCommunicationTurn
(){
return
this
.
communicationTurn
;
}
public
void
setCommunicationTurn
(
java
.
lang
.
Integer
communicationTurn
)
{
public
void
setCommunicationTurn
(
java
.
lang
.
Integer
communicationTurn
){
this
.
communicationTurn
=
communicationTurn
;
}
/**
* continuous_question_status
* 追问状态 默认-default 自定义-customizable 关闭-close
*/
/** continuous_question_status
*追问状态 默认-default 自定义-customizable 关闭-close
*/
private
java
.
lang
.
String
continuousQuestionStatus
;
public
java
.
lang
.
String
getContinuousQuestionStatus
()
{
public
java
.
lang
.
String
getContinuousQuestionStatus
(){
return
this
.
continuousQuestionStatus
;
}
public
void
setContinuousQuestionStatus
(
java
.
lang
.
String
continuousQuestionStatus
)
{
public
void
setContinuousQuestionStatus
(
java
.
lang
.
String
continuousQuestionStatus
){
this
.
continuousQuestionStatus
=
continuousQuestionStatus
;
}
/**
* continuous_question_system
* 追问prompt
*/
/** continuous_question_system
*追问prompt
*/
private
java
.
lang
.
String
continuousQuestionSystem
;
public
java
.
lang
.
String
getContinuousQuestionSystem
()
{
public
java
.
lang
.
String
getContinuousQuestionSystem
(){
return
this
.
continuousQuestionSystem
;
}
public
void
setContinuousQuestionSystem
(
java
.
lang
.
String
continuousQuestionSystem
)
{
public
void
setContinuousQuestionSystem
(
java
.
lang
.
String
continuousQuestionSystem
){
this
.
continuousQuestionSystem
=
continuousQuestionSystem
;
}
/**
* continuous_question_turn
* 追问轮次
*/
/** continuous_question_turn
*追问轮次 1-5
*/
private
java
.
lang
.
Integer
continuousQuestionTurn
;
public
java
.
lang
.
Integer
getContinuousQuestionTurn
()
{
public
java
.
lang
.
Integer
getContinuousQuestionTurn
(){
return
this
.
continuousQuestionTurn
;
}
public
void
setContinuousQuestionTurn
(
java
.
lang
.
Integer
continuousQuestionTurn
)
{
public
void
setContinuousQuestionTurn
(
java
.
lang
.
Integer
continuousQuestionTurn
){
this
.
continuousQuestionTurn
=
continuousQuestionTurn
;
}
/**
* knowledge_ids
* 知识库ID
*/
/** knowledge_ids
*知识库ID
*/
private
java
.
lang
.
String
[]
knowledgeIds
;
public
java
.
lang
.
String
[]
getKnowledgeIds
()
{
public
java
.
lang
.
String
[]
getKnowledgeIds
(){
return
this
.
knowledgeIds
;
}
public
void
setKnowledgeIds
(
java
.
lang
.
String
[]
knowledgeIds
)
{
public
void
setKnowledgeIds
(
java
.
lang
.
String
[]
knowledgeIds
){
this
.
knowledgeIds
=
knowledgeIds
;
}
/**
* large_model
* 问答模型
*/
/** large_model
*问答模型
*/
private
java
.
lang
.
String
largeModel
;
public
java
.
lang
.
String
getLargeModel
()
{
public
java
.
lang
.
String
getLargeModel
(){
return
this
.
largeModel
;
}
public
void
setLargeModel
(
java
.
lang
.
String
largeModel
)
{
public
void
setLargeModel
(
java
.
lang
.
String
largeModel
){
this
.
largeModel
=
largeModel
;
}
/**
* top_p
* 对话模型多样性配置 [0-1.00]
*/
/** top_p
*对话模型 多样性 [0-1.00]
*/
private
java
.
lang
.
Float
topP
;
public
Float
getTopP
()
{
return
topP
;
public
java
.
lang
.
Float
getTopP
()
{
return
t
his
.
t
opP
;
}
public
void
setTopP
(
Float
topP
)
{
public
void
setTopP
(
java
.
lang
.
Float
topP
)
{
this
.
topP
=
topP
;
}
/**
* unit_ids
* 组件ID
*/
/** unit_ids
*组件ID
*/
private
java
.
lang
.
String
[]
unitIds
;
public
java
.
lang
.
String
[]
getUnitIds
()
{
public
java
.
lang
.
String
[]
getUnitIds
(){
return
this
.
unitIds
;
}
public
void
setUnitIds
(
java
.
lang
.
String
[]
unitIds
)
{
public
void
setUnitIds
(
java
.
lang
.
String
[]
unitIds
){
this
.
unitIds
=
unitIds
;
}
/**
* is_deleted
* 是否删除 1、Y 是 2、N 否
*/
/** is_deleted
*是否删除 1、Y 是 2、N 否
*/
private
java
.
lang
.
String
isDeleted
;
public
java
.
lang
.
String
getIsDeleted
()
{
public
java
.
lang
.
String
getIsDeleted
(){
return
this
.
isDeleted
;
}
public
void
setIsDeleted
(
java
.
lang
.
String
isDeleted
)
{
public
void
setIsDeleted
(
java
.
lang
.
String
isDeleted
){
this
.
isDeleted
=
isDeleted
;
}
/**
* CREATOR
* 创建人
*/
/** CREATOR
*创建人
*/
private
java
.
lang
.
String
creator
;
public
java
.
lang
.
String
getCreator
()
{
public
java
.
lang
.
String
getCreator
(){
return
this
.
creator
;
}
public
void
setCreator
(
java
.
lang
.
String
creator
)
{
public
void
setCreator
(
java
.
lang
.
String
creator
){
this
.
creator
=
creator
;
}
/**
* CREATED_TIME
* 创建时间
*/
/** CREATED_TIME
*创建时间
*/
private
java
.
util
.
Date
createdTime
;
public
java
.
util
.
Date
getCreatedTime
()
{
public
java
.
util
.
Date
getCreatedTime
(){
return
this
.
createdTime
;
}
public
void
setCreatedTime
(
java
.
util
.
Date
createdTime
)
{
public
void
setCreatedTime
(
java
.
util
.
Date
createdTime
){
this
.
createdTime
=
createdTime
;
}
/**
* MODIFIER
* 修改人
*/
/** MODIFIER
*修改人
*/
private
java
.
lang
.
String
modifier
;
public
java
.
lang
.
String
getModifier
()
{
public
java
.
lang
.
String
getModifier
(){
return
this
.
modifier
;
}
public
void
setModifier
(
java
.
lang
.
String
modifier
)
{
public
void
setModifier
(
java
.
lang
.
String
modifier
){
this
.
modifier
=
modifier
;
}
/**
* MODIFIED_TIME
* 修改时间
*/
/** MODIFIED_TIME
*修改时间
*/
private
java
.
util
.
Date
modifiedTime
;
public
java
.
util
.
Date
getModifiedTime
()
{
public
java
.
util
.
Date
getModifiedTime
(){
return
this
.
modifiedTime
;
}
public
void
setModifiedTime
(
java
.
util
.
Date
modifiedTime
)
{
public
void
setModifiedTime
(
java
.
util
.
Date
modifiedTime
){
this
.
modifiedTime
=
modifiedTime
;
}
/**
* SYS_VERSION
* 乐观锁,版本号
*/
/** SYS_VERSION
*乐观锁,版本号
*/
private
java
.
lang
.
Integer
sysVersion
;
public
java
.
lang
.
Integer
getSysVersion
()
{
public
java
.
lang
.
Integer
getSysVersion
(){
return
this
.
sysVersion
;
}
public
void
setSysVersion
(
java
.
lang
.
Integer
sysVersion
)
{
public
void
setSysVersion
(
java
.
lang
.
Integer
sysVersion
){
this
.
sysVersion
=
sysVersion
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/entity/BizAgentApplicationLargeModelListEntity.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
entity
;
public
class
BizAgentApplicationLargeModelListEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*
*/
private
java
.
lang
.
Integer
id
;
public
java
.
lang
.
Integer
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Integer
id
){
this
.
id
=
id
;
}
/** model_name
*模型
*/
private
java
.
lang
.
String
modelName
;
public
java
.
lang
.
String
getModelName
(){
return
this
.
modelName
;
}
public
void
setModelName
(
java
.
lang
.
String
modelName
){
this
.
modelName
=
modelName
;
}
/** owner
*模型服务商
*/
private
java
.
lang
.
String
owner
;
public
java
.
lang
.
String
getOwner
(){
return
this
.
owner
;
}
public
void
setOwner
(
java
.
lang
.
String
owner
){
this
.
owner
=
owner
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/entity/BizAgentApplicationPublishEntity.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
entity
;
public
class
BizAgentApplicationPublishEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*自增ID
*/
private
java
.
lang
.
Integer
id
;
public
java
.
lang
.
Integer
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Integer
id
){
this
.
id
=
id
;
}
/** member_id
*创建应用的用户ID
*/
private
java
.
lang
.
Integer
memberId
;
public
java
.
lang
.
Integer
getMemberId
(){
return
this
.
memberId
;
}
public
void
setMemberId
(
java
.
lang
.
Integer
memberId
){
this
.
memberId
=
memberId
;
}
/** agent_id
*agent应用ID
*/
private
java
.
lang
.
String
agentId
;
public
java
.
lang
.
String
getAgentId
(){
return
this
.
agentId
;
}
public
void
setAgentId
(
java
.
lang
.
String
agentId
){
this
.
agentId
=
agentId
;
}
/** agent_avatar
*应用头像ICON地址
*/
private
java
.
lang
.
String
agentAvatar
;
public
java
.
lang
.
String
getAgentAvatar
(){
return
this
.
agentAvatar
;
}
public
void
setAgentAvatar
(
java
.
lang
.
String
agentAvatar
){
this
.
agentAvatar
=
agentAvatar
;
}
/** agent_title
*应用标题
*/
private
java
.
lang
.
String
agentTitle
;
public
java
.
lang
.
String
getAgentTitle
(){
return
this
.
agentTitle
;
}
public
void
setAgentTitle
(
java
.
lang
.
String
agentTitle
){
this
.
agentTitle
=
agentTitle
;
}
/** agent_desc
*应用描述
*/
private
java
.
lang
.
String
agentDesc
;
public
java
.
lang
.
String
getAgentDesc
(){
return
this
.
agentDesc
;
}
public
void
setAgentDesc
(
java
.
lang
.
String
agentDesc
){
this
.
agentDesc
=
agentDesc
;
}
/** agent_system
*角色指令
*/
private
java
.
lang
.
String
agentSystem
;
public
java
.
lang
.
String
getAgentSystem
(){
return
this
.
agentSystem
;
}
public
void
setAgentSystem
(
java
.
lang
.
String
agentSystem
){
this
.
agentSystem
=
agentSystem
;
}
/** agent_publish_status
*应用发布状态 草稿-draft 发布-publish
*/
private
java
.
lang
.
String
agentPublishStatus
;
public
java
.
lang
.
String
getAgentPublishStatus
(){
return
this
.
agentPublishStatus
;
}
public
void
setAgentPublishStatus
(
java
.
lang
.
String
agentPublishStatus
){
this
.
agentPublishStatus
=
agentPublishStatus
;
}
/** publish_time
*发布时间
*/
private
java
.
util
.
Date
publishTime
;
public
java
.
util
.
Date
getPublishTime
(){
return
this
.
publishTime
;
}
public
void
setPublishTime
(
java
.
util
.
Date
publishTime
){
this
.
publishTime
=
publishTime
;
}
/** preamble
*开场白
*/
private
java
.
lang
.
String
preamble
;
public
java
.
lang
.
String
getPreamble
(){
return
this
.
preamble
;
}
public
void
setPreamble
(
java
.
lang
.
String
preamble
){
this
.
preamble
=
preamble
;
}
/** featured_questions
*推荐问
*/
private
java
.
lang
.
String
[]
featuredQuestions
;
public
java
.
lang
.
String
[]
getFeaturedQuestions
(){
return
this
.
featuredQuestions
;
}
public
void
setFeaturedQuestions
(
java
.
lang
.
String
[]
featuredQuestions
){
this
.
featuredQuestions
=
featuredQuestions
;
}
/** communication_turn
*对话上下文保存轮次 0-100
*/
private
java
.
lang
.
Integer
communicationTurn
;
public
java
.
lang
.
Integer
getCommunicationTurn
(){
return
this
.
communicationTurn
;
}
public
void
setCommunicationTurn
(
java
.
lang
.
Integer
communicationTurn
){
this
.
communicationTurn
=
communicationTurn
;
}
/** continuous_question_status
*追问状态 默认-default 自定义-customizable 关闭-close
*/
private
java
.
lang
.
String
continuousQuestionStatus
;
public
java
.
lang
.
String
getContinuousQuestionStatus
(){
return
this
.
continuousQuestionStatus
;
}
public
void
setContinuousQuestionStatus
(
java
.
lang
.
String
continuousQuestionStatus
){
this
.
continuousQuestionStatus
=
continuousQuestionStatus
;
}
/** continuous_question_system
*追问prompt
*/
private
java
.
lang
.
String
continuousQuestionSystem
;
public
java
.
lang
.
String
getContinuousQuestionSystem
(){
return
this
.
continuousQuestionSystem
;
}
public
void
setContinuousQuestionSystem
(
java
.
lang
.
String
continuousQuestionSystem
){
this
.
continuousQuestionSystem
=
continuousQuestionSystem
;
}
/** continuous_question_turn
*追问轮次 1-5
*/
private
java
.
lang
.
Integer
continuousQuestionTurn
;
public
java
.
lang
.
Integer
getContinuousQuestionTurn
(){
return
this
.
continuousQuestionTurn
;
}
public
void
setContinuousQuestionTurn
(
java
.
lang
.
Integer
continuousQuestionTurn
){
this
.
continuousQuestionTurn
=
continuousQuestionTurn
;
}
/** knowledge_ids
*知识库ID
*/
private
java
.
lang
.
String
[]
knowledgeIds
;
public
java
.
lang
.
String
[]
getKnowledgeIds
(){
return
this
.
knowledgeIds
;
}
public
void
setKnowledgeIds
(
java
.
lang
.
String
[]
knowledgeIds
){
this
.
knowledgeIds
=
knowledgeIds
;
}
/** large_model
*问答模型
*/
private
java
.
lang
.
String
largeModel
;
public
java
.
lang
.
String
getLargeModel
(){
return
this
.
largeModel
;
}
public
void
setLargeModel
(
java
.
lang
.
String
largeModel
){
this
.
largeModel
=
largeModel
;
}
/** top_p
*对话模型 多样性 [0-1.00]
*/
private
java
.
lang
.
Float
topP
;
public
java
.
lang
.
Float
getTopP
(){
return
this
.
topP
;
}
public
void
setTopP
(
java
.
lang
.
Float
topP
){
this
.
topP
=
topP
;
}
/** unit_ids
*组件ID
*/
private
java
.
lang
.
String
[]
unitIds
;
public
java
.
lang
.
String
[]
getUnitIds
(){
return
this
.
unitIds
;
}
public
void
setUnitIds
(
java
.
lang
.
String
[]
unitIds
){
this
.
unitIds
=
unitIds
;
}
/** is_deleted
*是否删除 1、Y 是 2、N 否
*/
private
java
.
lang
.
String
isDeleted
;
public
java
.
lang
.
String
getIsDeleted
(){
return
this
.
isDeleted
;
}
public
void
setIsDeleted
(
java
.
lang
.
String
isDeleted
){
this
.
isDeleted
=
isDeleted
;
}
/** CREATOR
*创建人
*/
private
java
.
lang
.
String
creator
;
public
java
.
lang
.
String
getCreator
(){
return
this
.
creator
;
}
public
void
setCreator
(
java
.
lang
.
String
creator
){
this
.
creator
=
creator
;
}
/** CREATED_TIME
*创建时间
*/
private
java
.
util
.
Date
createdTime
;
public
java
.
util
.
Date
getCreatedTime
(){
return
this
.
createdTime
;
}
public
void
setCreatedTime
(
java
.
util
.
Date
createdTime
){
this
.
createdTime
=
createdTime
;
}
/** MODIFIER
*修改人
*/
private
java
.
lang
.
String
modifier
;
public
java
.
lang
.
String
getModifier
(){
return
this
.
modifier
;
}
public
void
setModifier
(
java
.
lang
.
String
modifier
){
this
.
modifier
=
modifier
;
}
/** MODIFIED_TIME
*修改时间
*/
private
java
.
util
.
Date
modifiedTime
;
public
java
.
util
.
Date
getModifiedTime
(){
return
this
.
modifiedTime
;
}
public
void
setModifiedTime
(
java
.
util
.
Date
modifiedTime
){
this
.
modifiedTime
=
modifiedTime
;
}
/** SYS_VERSION
*乐观锁,版本号
*/
private
java
.
lang
.
Integer
sysVersion
;
public
java
.
lang
.
Integer
getSysVersion
(){
return
this
.
sysVersion
;
}
public
void
setSysVersion
(
java
.
lang
.
Integer
sysVersion
){
this
.
sysVersion
=
sysVersion
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/model/BizAgentApplicationDialoguesRecordModel.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
model
;
import
java.io.Serializable
;
import
cn.com.yict.framemax.data.model.BaseModelClass
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
javax.persistence.Id
;
import
org.hibernate.annotations.DynamicInsert
;
import
org.hibernate.annotations.DynamicUpdate
;
import
javax.persistence.Version
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
/**
* Model class for biz_agent_application_dialogues_record
* Agent应用-用户对话记录
*/
@Entity
@Table
(
name
=
"biz_agent_application_dialogues_record"
)
@DynamicInsert
@DynamicUpdate
public
class
BizAgentApplicationDialoguesRecordModel
extends
BaseModelClass
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* id
* 主键ID
*/
private
java
.
lang
.
Long
id
;
@Column
(
name
=
"id"
,
length
=
19
)
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
public
java
.
lang
.
Long
getId
()
{
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Long
id
)
{
this
.
id
=
id
;
super
.
addValidField
(
"id"
);
}
/**
* role
* 角色 user-用户 assistant-助手
*/
private
java
.
lang
.
String
role
;
@Column
(
name
=
"role"
,
length
=
100
)
public
java
.
lang
.
String
getRole
()
{
return
this
.
role
;
}
public
void
setRole
(
java
.
lang
.
String
role
)
{
this
.
role
=
role
;
super
.
addValidField
(
"role"
);
}
/**
* dialogsId
* 对话ID
*/
private
java
.
lang
.
String
dialogsId
;
@Column
(
name
=
"dialogs_id"
,
length
=
100
)
public
String
getDialogsId
()
{
return
dialogsId
;
}
public
void
setDialogsId
(
String
dialogsId
)
{
this
.
dialogsId
=
dialogsId
;
super
.
addValidField
(
"dialogsId"
);
}
/**
* agent_id
* agent应用ID
*/
private
java
.
lang
.
String
agentId
;
@Column
(
name
=
"agent_id"
,
length
=
200
)
public
java
.
lang
.
String
getAgentId
()
{
return
this
.
agentId
;
}
public
void
setAgentId
(
java
.
lang
.
String
agentId
)
{
this
.
agentId
=
agentId
;
super
.
addValidField
(
"agentId"
);
}
/**
* member_id
* 用户ID
*/
private
java
.
lang
.
Long
memberId
;
@Column
(
name
=
"member_id"
,
length
=
19
)
public
java
.
lang
.
Long
getMemberId
()
{
return
this
.
memberId
;
}
public
void
setMemberId
(
java
.
lang
.
Long
memberId
)
{
this
.
memberId
=
memberId
;
super
.
addValidField
(
"memberId"
);
}
/**
* content
* 内容
*/
private
java
.
lang
.
String
content
;
@Column
(
name
=
"content"
,
length
=
2147483647
)
public
java
.
lang
.
String
getContent
()
{
return
this
.
content
;
}
public
void
setContent
(
java
.
lang
.
String
content
)
{
this
.
content
=
content
;
super
.
addValidField
(
"content"
);
}
/**
* timestamp
* 时间戳
*/
private
java
.
lang
.
Long
timestamp
;
@Column
(
name
=
"timestamp"
,
length
=
19
)
public
java
.
lang
.
Long
getTimestamp
()
{
return
this
.
timestamp
;
}
public
void
setTimestamp
(
java
.
lang
.
Long
timestamp
)
{
this
.
timestamp
=
timestamp
;
super
.
addValidField
(
"timestamp"
);
}
/**
* is_deleted
* 是否删除 1、Y 是 2、N 否
*/
private
java
.
lang
.
String
isDeleted
;
@Column
(
name
=
"is_deleted"
,
length
=
1
)
public
java
.
lang
.
String
getIsDeleted
()
{
return
this
.
isDeleted
;
}
public
void
setIsDeleted
(
java
.
lang
.
String
isDeleted
)
{
this
.
isDeleted
=
isDeleted
;
super
.
addValidField
(
"isDeleted"
);
}
/**
* CREATOR
* 创建人
*/
private
java
.
lang
.
String
creator
;
@Column
(
name
=
"CREATOR"
,
length
=
225
)
public
java
.
lang
.
String
getCreator
()
{
return
this
.
creator
;
}
public
void
setCreator
(
java
.
lang
.
String
creator
)
{
this
.
creator
=
creator
;
super
.
addValidField
(
"creator"
);
}
/**
* CREATED_TIME
* 创建时间
*/
private
java
.
util
.
Date
createdTime
;
@Column
(
name
=
"CREATED_TIME"
,
length
=
19
)
public
java
.
util
.
Date
getCreatedTime
()
{
return
this
.
createdTime
;
}
public
void
setCreatedTime
(
java
.
util
.
Date
createdTime
)
{
this
.
createdTime
=
createdTime
;
super
.
addValidField
(
"createdTime"
);
}
/**
* MODIFIER
* 修改人
*/
private
java
.
lang
.
String
modifier
;
@Column
(
name
=
"MODIFIER"
,
length
=
225
)
public
java
.
lang
.
String
getModifier
()
{
return
this
.
modifier
;
}
public
void
setModifier
(
java
.
lang
.
String
modifier
)
{
this
.
modifier
=
modifier
;
super
.
addValidField
(
"modifier"
);
}
/**
* MODIFIED_TIME
* 修改时间
*/
private
java
.
util
.
Date
modifiedTime
;
@Column
(
name
=
"MODIFIED_TIME"
,
length
=
19
)
public
java
.
util
.
Date
getModifiedTime
()
{
return
this
.
modifiedTime
;
}
public
void
setModifiedTime
(
java
.
util
.
Date
modifiedTime
)
{
this
.
modifiedTime
=
modifiedTime
;
super
.
addValidField
(
"modifiedTime"
);
}
/**
* SYS_VERSION
* 乐观锁,版本号
*/
private
java
.
lang
.
Integer
sysVersion
;
@Column
(
name
=
"SYS_VERSION"
,
length
=
10
)
@Version
public
java
.
lang
.
Integer
getSysVersion
()
{
return
this
.
sysVersion
;
}
public
void
setSysVersion
(
java
.
lang
.
Integer
sysVersion
)
{
this
.
sysVersion
=
sysVersion
;
super
.
addValidField
(
"sysVersion"
);
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/model/BizAgentApplicationInfoModel.java
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
model
;
package
cn
.
com
.
poc
.
agent_application
.
model
;
import
java.io.Serializable
;
import
cn.com.yict.framemax.data.model.BaseModelClass
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
javax.persistence.Id
;
import
org.hibernate.annotations.DynamicInsert
;
import
org.hibernate.annotations.DynamicUpdate
;
import
javax.persistence.Version
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
/**
* Model class for agent_application_info
* Model class for
biz_
agent_application_info
* Agent应用配置
*/
@Entity
...
...
@@ -27,412 +23,408 @@ import javax.persistence.GenerationType;
public
class
BizAgentApplicationInfoModel
extends
BaseModelClass
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* id
* 自增ID
*/
/** id
*自增ID
*/
private
java
.
lang
.
Integer
id
;
@Column
(
name
=
"id"
,
length
=
10
)
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
public
java
.
lang
.
Integer
getId
()
{
@Column
(
name
=
"id"
,
length
=
10
)
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
public
java
.
lang
.
Integer
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Integer
id
)
{
public
void
setId
(
java
.
lang
.
Integer
id
){
this
.
id
=
id
;
super
.
addValidField
(
"id"
);
}
/**
* member_id
*
创建应用的用户ID
*/
/*
* member_id
*
创建应用的用户ID
*/
private
java
.
lang
.
Integer
memberId
;
@Column
(
name
=
"member_id"
,
length
=
10
)
public
Integer
getMemberId
()
{
return
memberId
;
@Column
(
name
=
"member_id"
,
length
=
10
)
public
java
.
lang
.
Integer
getMemberId
()
{
return
this
.
memberId
;
}
public
void
setMemberId
(
Integer
memberId
)
{
public
void
setMemberId
(
java
.
lang
.
Integer
memberId
)
{
this
.
memberId
=
memberId
;
super
.
addValidField
(
"memberId"
);
}
/**
* agent_id
*
agent应用ID
*/
/*
* agent_id
*
agent应用ID
*/
private
java
.
lang
.
String
agentId
;
@Column
(
name
=
"agent_id"
,
length
=
200
)
public
java
.
lang
.
String
getAgentId
()
{
@Column
(
name
=
"agent_id"
,
length
=
200
)
public
java
.
lang
.
String
getAgentId
(){
return
this
.
agentId
;
}
public
void
setAgentId
(
java
.
lang
.
String
agentId
)
{
public
void
setAgentId
(
java
.
lang
.
String
agentId
){
this
.
agentId
=
agentId
;
super
.
addValidField
(
"agentId"
);
}
/**
* agent_title
* 应用标题
*/
private
java
.
lang
.
String
agentTitle
;
@Column
(
name
=
"agent_title"
,
length
=
50
)
public
java
.
lang
.
String
getAgentTitle
()
{
return
this
.
agentTitle
;
}
public
void
setAgentTitle
(
java
.
lang
.
String
agentTitle
)
{
this
.
agentTitle
=
agentTitle
;
super
.
addValidField
(
"agentTitle"
);
}
/**
* agent_avatar
* 应用头像URL
*/
/** agent_avatar
*应用头像ICON地址
*/
private
java
.
lang
.
String
agentAvatar
;
@Column
(
name
=
"agent_avatar"
,
length
=
200
)
public
java
.
lang
.
String
getAgentAvatar
()
{
@Column
(
name
=
"agent_avatar"
,
length
=
200
)
public
java
.
lang
.
String
getAgentAvatar
(){
return
this
.
agentAvatar
;
}
public
void
setAgentAvatar
(
java
.
lang
.
String
agentAvatar
)
{
public
void
setAgentAvatar
(
java
.
lang
.
String
agentAvatar
){
this
.
agentAvatar
=
agentAvatar
;
super
.
addValidField
(
"agentAvatar"
);
}
/**
* agent_desc
* 应用描述
*/
/** agent_title
*应用标题
*/
private
java
.
lang
.
String
agentTitle
;
@Column
(
name
=
"agent_title"
,
length
=
50
)
public
java
.
lang
.
String
getAgentTitle
(){
return
this
.
agentTitle
;
}
public
void
setAgentTitle
(
java
.
lang
.
String
agentTitle
){
this
.
agentTitle
=
agentTitle
;
super
.
addValidField
(
"agentTitle"
);
}
/** agent_desc
*应用描述
*/
private
java
.
lang
.
String
agentDesc
;
@Column
(
name
=
"agent_desc"
,
length
=
100
)
public
java
.
lang
.
String
getAgentDesc
()
{
@Column
(
name
=
"agent_desc"
,
length
=
100
)
public
java
.
lang
.
String
getAgentDesc
(){
return
this
.
agentDesc
;
}
public
void
setAgentDesc
(
java
.
lang
.
String
agentDesc
)
{
public
void
setAgentDesc
(
java
.
lang
.
String
agentDesc
){
this
.
agentDesc
=
agentDesc
;
super
.
addValidField
(
"agentDesc"
);
}
/**
* agent_system
* 角色指令
*/
/** agent_system
*角色指令
*/
private
java
.
lang
.
String
agentSystem
;
@Column
(
name
=
"agent_system"
,
length
=
2147483647
)
public
java
.
lang
.
String
getAgentSystem
()
{
@Column
(
name
=
"agent_system"
,
length
=
2147483647
)
public
java
.
lang
.
String
getAgentSystem
(){
return
this
.
agentSystem
;
}
public
void
setAgentSystem
(
java
.
lang
.
String
agentSystem
)
{
public
void
setAgentSystem
(
java
.
lang
.
String
agentSystem
){
this
.
agentSystem
=
agentSystem
;
super
.
addValidField
(
"agentSystem"
);
}
/**
* agent_publish_status
* 应用发布状态 草稿-draft 发布-publish
*/
/** agent_publish_status
*应用发布状态 草稿-draft 发布-publish
*/
private
java
.
lang
.
String
agentPublishStatus
;
@Column
(
name
=
"agent_publish_status"
,
length
=
10
)
public
java
.
lang
.
String
getAgentPublishStatus
()
{
@Column
(
name
=
"agent_publish_status"
,
length
=
10
)
public
java
.
lang
.
String
getAgentPublishStatus
(){
return
this
.
agentPublishStatus
;
}
public
void
setAgentPublishStatus
(
java
.
lang
.
String
agentPublishStatus
)
{
public
void
setAgentPublishStatus
(
java
.
lang
.
String
agentPublishStatus
){
this
.
agentPublishStatus
=
agentPublishStatus
;
super
.
addValidField
(
"agentPublishStatus"
);
}
/**
* preamble
* 开场白
*/
/** publish_time
*发布时间
*/
private
java
.
util
.
Date
publishTime
;
@Column
(
name
=
"publish_time"
,
length
=
19
)
public
java
.
util
.
Date
getPublishTime
(){
return
this
.
publishTime
;
}
public
void
setPublishTime
(
java
.
util
.
Date
publishTime
){
this
.
publishTime
=
publishTime
;
super
.
addValidField
(
"publishTime"
);
}
/** preamble
*开场白
*/
private
java
.
lang
.
String
preamble
;
@Column
(
name
=
"preamble"
,
length
=
2147483647
)
public
java
.
lang
.
String
getPreamble
()
{
@Column
(
name
=
"preamble"
,
length
=
2147483647
)
public
java
.
lang
.
String
getPreamble
(){
return
this
.
preamble
;
}
public
void
setPreamble
(
java
.
lang
.
String
preamble
)
{
public
void
setPreamble
(
java
.
lang
.
String
preamble
){
this
.
preamble
=
preamble
;
super
.
addValidField
(
"preamble"
);
}
/**
* featured_questions
* 推荐问
*/
/** featured_questions
*推荐问
*/
private
java
.
lang
.
String
featuredQuestions
;
@Column
(
name
=
"featured_questions"
,
length
=
1073741824
)
public
java
.
lang
.
String
getFeaturedQuestions
()
{
@Column
(
name
=
"featured_questions"
,
length
=
1073741824
)
public
java
.
lang
.
String
getFeaturedQuestions
(){
return
this
.
featuredQuestions
;
}
public
void
setFeaturedQuestions
(
java
.
lang
.
String
featuredQuestions
)
{
public
void
setFeaturedQuestions
(
java
.
lang
.
String
featuredQuestions
){
this
.
featuredQuestions
=
featuredQuestions
;
super
.
addValidField
(
"featuredQuestions"
);
}
/**
* communication_turn
* 对话上下文保存轮次
*/
/** communication_turn
*对话上下文保存轮次 0-100
*/
private
java
.
lang
.
Integer
communicationTurn
;
@Column
(
name
=
"communication_turn"
,
length
=
10
)
public
java
.
lang
.
Integer
getCommunicationTurn
()
{
@Column
(
name
=
"communication_turn"
,
length
=
10
)
public
java
.
lang
.
Integer
getCommunicationTurn
(){
return
this
.
communicationTurn
;
}
public
void
setCommunicationTurn
(
java
.
lang
.
Integer
communicationTurn
)
{
public
void
setCommunicationTurn
(
java
.
lang
.
Integer
communicationTurn
){
this
.
communicationTurn
=
communicationTurn
;
super
.
addValidField
(
"communicationTurn"
);
}
/**
* continuous_question_status
* 追问状态 默认-default 自定义-customizable 关闭-close
*/
/** continuous_question_status
*追问状态 默认-default 自定义-customizable 关闭-close
*/
private
java
.
lang
.
String
continuousQuestionStatus
;
@Column
(
name
=
"continuous_question_status"
,
length
=
15
)
public
java
.
lang
.
String
getContinuousQuestionStatus
()
{
@Column
(
name
=
"continuous_question_status"
,
length
=
15
)
public
java
.
lang
.
String
getContinuousQuestionStatus
(){
return
this
.
continuousQuestionStatus
;
}
public
void
setContinuousQuestionStatus
(
java
.
lang
.
String
continuousQuestionStatus
)
{
public
void
setContinuousQuestionStatus
(
java
.
lang
.
String
continuousQuestionStatus
){
this
.
continuousQuestionStatus
=
continuousQuestionStatus
;
super
.
addValidField
(
"continuousQuestionStatus"
);
}
/**
* continuous_question_system
* 追问prompt
*/
/** continuous_question_system
*追问prompt
*/
private
java
.
lang
.
String
continuousQuestionSystem
;
@Column
(
name
=
"continuous_question_system"
,
length
=
2147483647
)
public
java
.
lang
.
String
getContinuousQuestionSystem
()
{
@Column
(
name
=
"continuous_question_system"
,
length
=
2147483647
)
public
java
.
lang
.
String
getContinuousQuestionSystem
(){
return
this
.
continuousQuestionSystem
;
}
public
void
setContinuousQuestionSystem
(
java
.
lang
.
String
continuousQuestionSystem
)
{
public
void
setContinuousQuestionSystem
(
java
.
lang
.
String
continuousQuestionSystem
){
this
.
continuousQuestionSystem
=
continuousQuestionSystem
;
super
.
addValidField
(
"continuousQuestionSystem"
);
}
/**
* continuous_question_turn
* 追问轮次
*/
/** continuous_question_turn
*追问轮次 1-5
*/
private
java
.
lang
.
Integer
continuousQuestionTurn
;
@Column
(
name
=
"continuous_question_turn"
,
length
=
10
)
public
java
.
lang
.
Integer
getContinuousQuestionTurn
()
{
@Column
(
name
=
"continuous_question_turn"
,
length
=
10
)
public
java
.
lang
.
Integer
getContinuousQuestionTurn
(){
return
this
.
continuousQuestionTurn
;
}
public
void
setContinuousQuestionTurn
(
java
.
lang
.
Integer
continuousQuestionTurn
)
{
public
void
setContinuousQuestionTurn
(
java
.
lang
.
Integer
continuousQuestionTurn
){
this
.
continuousQuestionTurn
=
continuousQuestionTurn
;
super
.
addValidField
(
"continuousQuestionTurn"
);
}
/**
* knowledge_ids
* 知识库ID
*/
/** knowledge_ids
*知识库ID
*/
private
java
.
lang
.
String
knowledgeIds
;
@Column
(
name
=
"knowledge_ids"
,
length
=
1073741824
)
public
java
.
lang
.
String
getKnowledgeIds
()
{
@Column
(
name
=
"knowledge_ids"
,
length
=
1073741824
)
public
java
.
lang
.
String
getKnowledgeIds
(){
return
this
.
knowledgeIds
;
}
public
void
setKnowledgeIds
(
java
.
lang
.
String
knowledgeIds
)
{
public
void
setKnowledgeIds
(
java
.
lang
.
String
knowledgeIds
){
this
.
knowledgeIds
=
knowledgeIds
;
super
.
addValidField
(
"knowledgeIds"
);
}
/**
* large_model
* 问答模型
*/
/** large_model
*问答模型
*/
private
java
.
lang
.
String
largeModel
;
@Column
(
name
=
"large_model"
,
length
=
25
)
public
java
.
lang
.
String
getLargeModel
()
{
@Column
(
name
=
"large_model"
,
length
=
25
)
public
java
.
lang
.
String
getLargeModel
(){
return
this
.
largeModel
;
}
public
void
setLargeModel
(
java
.
lang
.
String
largeModel
)
{
public
void
setLargeModel
(
java
.
lang
.
String
largeModel
){
this
.
largeModel
=
largeModel
;
super
.
addValidField
(
"largeModel"
);
}
/**
* top_p
* 对话模型多样性配置
[0-1.00]
*/
/*
* top_p
*对话模型 多样性
[0-1.00]
*/
private
java
.
lang
.
Float
topP
;
@Column
(
name
=
"top_p"
,
length
=
10
)
public
Float
getTopP
()
{
return
topP
;
@Column
(
name
=
"top_p"
,
length
=
12
)
public
java
.
lang
.
Float
getTopP
()
{
return
t
his
.
t
opP
;
}
public
void
setTopP
(
Float
topP
)
{
public
void
setTopP
(
java
.
lang
.
Float
topP
)
{
this
.
topP
=
topP
;
super
.
addValidField
(
"topP"
);
}
/**
* unit_ids
*
组件ID
*/
/*
* unit_ids
*
组件ID
*/
private
java
.
lang
.
String
unitIds
;
@Column
(
name
=
"unit_ids"
,
length
=
1073741824
)
public
java
.
lang
.
String
getUnitIds
()
{
@Column
(
name
=
"unit_ids"
,
length
=
1073741824
)
public
java
.
lang
.
String
getUnitIds
(){
return
this
.
unitIds
;
}
public
void
setUnitIds
(
java
.
lang
.
String
unitIds
)
{
public
void
setUnitIds
(
java
.
lang
.
String
unitIds
){
this
.
unitIds
=
unitIds
;
super
.
addValidField
(
"unitIds"
);
}
/**
* is_deleted
* 是否删除 1、Y 是 2、N 否
*/
/** is_deleted
*是否删除 1、Y 是 2、N 否
*/
private
java
.
lang
.
String
isDeleted
;
@Column
(
name
=
"is_deleted"
,
length
=
1
)
public
java
.
lang
.
String
getIsDeleted
()
{
@Column
(
name
=
"is_deleted"
,
length
=
1
)
public
java
.
lang
.
String
getIsDeleted
(){
return
this
.
isDeleted
;
}
public
void
setIsDeleted
(
java
.
lang
.
String
isDeleted
)
{
public
void
setIsDeleted
(
java
.
lang
.
String
isDeleted
){
this
.
isDeleted
=
isDeleted
;
super
.
addValidField
(
"isDeleted"
);
}
/**
* CREATOR
* 创建人
*/
/** CREATOR
*创建人
*/
private
java
.
lang
.
String
creator
;
@Column
(
name
=
"CREATOR"
,
length
=
225
)
public
java
.
lang
.
String
getCreator
()
{
@Column
(
name
=
"CREATOR"
,
length
=
225
)
public
java
.
lang
.
String
getCreator
(){
return
this
.
creator
;
}
public
void
setCreator
(
java
.
lang
.
String
creator
)
{
public
void
setCreator
(
java
.
lang
.
String
creator
){
this
.
creator
=
creator
;
super
.
addValidField
(
"creator"
);
}
/**
* CREATED_TIME
* 创建时间
*/
/** CREATED_TIME
*创建时间
*/
private
java
.
util
.
Date
createdTime
;
@Column
(
name
=
"CREATED_TIME"
,
length
=
19
)
public
java
.
util
.
Date
getCreatedTime
()
{
@Column
(
name
=
"CREATED_TIME"
,
length
=
19
)
public
java
.
util
.
Date
getCreatedTime
(){
return
this
.
createdTime
;
}
public
void
setCreatedTime
(
java
.
util
.
Date
createdTime
)
{
public
void
setCreatedTime
(
java
.
util
.
Date
createdTime
){
this
.
createdTime
=
createdTime
;
super
.
addValidField
(
"createdTime"
);
}
/**
* MODIFIER
* 修改人
*/
/** MODIFIER
*修改人
*/
private
java
.
lang
.
String
modifier
;
@Column
(
name
=
"MODIFIER"
,
length
=
225
)
public
java
.
lang
.
String
getModifier
()
{
@Column
(
name
=
"MODIFIER"
,
length
=
225
)
public
java
.
lang
.
String
getModifier
(){
return
this
.
modifier
;
}
public
void
setModifier
(
java
.
lang
.
String
modifier
)
{
public
void
setModifier
(
java
.
lang
.
String
modifier
){
this
.
modifier
=
modifier
;
super
.
addValidField
(
"modifier"
);
}
/**
* MODIFIED_TIME
* 修改时间
*/
/** MODIFIED_TIME
*修改时间
*/
private
java
.
util
.
Date
modifiedTime
;
@Column
(
name
=
"MODIFIED_TIME"
,
length
=
19
)
public
java
.
util
.
Date
getModifiedTime
()
{
@Column
(
name
=
"MODIFIED_TIME"
,
length
=
19
)
public
java
.
util
.
Date
getModifiedTime
(){
return
this
.
modifiedTime
;
}
public
void
setModifiedTime
(
java
.
util
.
Date
modifiedTime
)
{
public
void
setModifiedTime
(
java
.
util
.
Date
modifiedTime
){
this
.
modifiedTime
=
modifiedTime
;
super
.
addValidField
(
"modifiedTime"
);
}
/**
* SYS_VERSION
* 乐观锁,版本号
*/
/** SYS_VERSION
*乐观锁,版本号
*/
private
java
.
lang
.
Integer
sysVersion
;
@Column
(
name
=
"SYS_VERSION"
,
length
=
10
)
@Version
public
java
.
lang
.
Integer
getSysVersion
()
{
@Column
(
name
=
"SYS_VERSION"
,
length
=
10
)
@Version
public
java
.
lang
.
Integer
getSysVersion
(){
return
this
.
sysVersion
;
}
public
void
setSysVersion
(
java
.
lang
.
Integer
sysVersion
)
{
public
void
setSysVersion
(
java
.
lang
.
Integer
sysVersion
){
this
.
sysVersion
=
sysVersion
;
super
.
addValidField
(
"sysVersion"
);
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/model/BizAgentApplicationLargeModelListModel.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
model
;
import
java.io.Serializable
;
import
cn.com.yict.framemax.data.model.BaseModelClass
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
javax.persistence.Id
;
import
org.hibernate.annotations.DynamicInsert
;
import
org.hibernate.annotations.DynamicUpdate
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
/**
* Model class for biz_agent_application_large_model_list
* 大模型列表
*/
@Entity
@Table
(
name
=
"biz_agent_application_large_model_list"
)
@DynamicInsert
@DynamicUpdate
public
class
BizAgentApplicationLargeModelListModel
extends
BaseModelClass
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*
*/
private
java
.
lang
.
Integer
id
;
@Column
(
name
=
"id"
,
length
=
10
)
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
public
java
.
lang
.
Integer
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Integer
id
){
this
.
id
=
id
;
super
.
addValidField
(
"id"
);
}
/** model_name
*模型
*/
private
java
.
lang
.
String
modelName
;
@Column
(
name
=
"model_name"
,
length
=
100
)
public
java
.
lang
.
String
getModelName
(){
return
this
.
modelName
;
}
public
void
setModelName
(
java
.
lang
.
String
modelName
){
this
.
modelName
=
modelName
;
super
.
addValidField
(
"modelName"
);
}
/** owner
*模型服务商
*/
private
java
.
lang
.
String
owner
;
@Column
(
name
=
"owner"
,
length
=
100
)
public
java
.
lang
.
String
getOwner
(){
return
this
.
owner
;
}
public
void
setOwner
(
java
.
lang
.
String
owner
){
this
.
owner
=
owner
;
super
.
addValidField
(
"owner"
);
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/model/BizAgentApplicationPublishModel.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
model
;
import
java.io.Serializable
;
import
cn.com.yict.framemax.data.model.BaseModelClass
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
javax.persistence.Id
;
import
org.hibernate.annotations.DynamicInsert
;
import
org.hibernate.annotations.DynamicUpdate
;
import
javax.persistence.Version
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
/**
* Model class for biz_agent_application_publish
* Agent应用发布配置
*/
@Entity
@Table
(
name
=
"biz_agent_application_publish"
)
@DynamicInsert
@DynamicUpdate
public
class
BizAgentApplicationPublishModel
extends
BaseModelClass
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/** id
*自增ID
*/
private
java
.
lang
.
Integer
id
;
@Column
(
name
=
"id"
,
length
=
10
)
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
public
java
.
lang
.
Integer
getId
(){
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Integer
id
){
this
.
id
=
id
;
super
.
addValidField
(
"id"
);
}
/** member_id
*创建应用的用户ID
*/
private
java
.
lang
.
Integer
memberId
;
@Column
(
name
=
"member_id"
,
length
=
10
)
public
java
.
lang
.
Integer
getMemberId
(){
return
this
.
memberId
;
}
public
void
setMemberId
(
java
.
lang
.
Integer
memberId
){
this
.
memberId
=
memberId
;
super
.
addValidField
(
"memberId"
);
}
/** agent_id
*agent应用ID
*/
private
java
.
lang
.
String
agentId
;
@Column
(
name
=
"agent_id"
,
length
=
200
)
public
java
.
lang
.
String
getAgentId
(){
return
this
.
agentId
;
}
public
void
setAgentId
(
java
.
lang
.
String
agentId
){
this
.
agentId
=
agentId
;
super
.
addValidField
(
"agentId"
);
}
/** agent_avatar
*应用头像ICON地址
*/
private
java
.
lang
.
String
agentAvatar
;
@Column
(
name
=
"agent_avatar"
,
length
=
200
)
public
java
.
lang
.
String
getAgentAvatar
(){
return
this
.
agentAvatar
;
}
public
void
setAgentAvatar
(
java
.
lang
.
String
agentAvatar
){
this
.
agentAvatar
=
agentAvatar
;
super
.
addValidField
(
"agentAvatar"
);
}
/** agent_title
*应用标题
*/
private
java
.
lang
.
String
agentTitle
;
@Column
(
name
=
"agent_title"
,
length
=
50
)
public
java
.
lang
.
String
getAgentTitle
(){
return
this
.
agentTitle
;
}
public
void
setAgentTitle
(
java
.
lang
.
String
agentTitle
){
this
.
agentTitle
=
agentTitle
;
super
.
addValidField
(
"agentTitle"
);
}
/** agent_desc
*应用描述
*/
private
java
.
lang
.
String
agentDesc
;
@Column
(
name
=
"agent_desc"
,
length
=
100
)
public
java
.
lang
.
String
getAgentDesc
(){
return
this
.
agentDesc
;
}
public
void
setAgentDesc
(
java
.
lang
.
String
agentDesc
){
this
.
agentDesc
=
agentDesc
;
super
.
addValidField
(
"agentDesc"
);
}
/** agent_system
*角色指令
*/
private
java
.
lang
.
String
agentSystem
;
@Column
(
name
=
"agent_system"
,
length
=
2147483647
)
public
java
.
lang
.
String
getAgentSystem
(){
return
this
.
agentSystem
;
}
public
void
setAgentSystem
(
java
.
lang
.
String
agentSystem
){
this
.
agentSystem
=
agentSystem
;
super
.
addValidField
(
"agentSystem"
);
}
/** preamble
*开场白
*/
private
java
.
lang
.
String
preamble
;
@Column
(
name
=
"preamble"
,
length
=
2147483647
)
public
java
.
lang
.
String
getPreamble
(){
return
this
.
preamble
;
}
public
void
setPreamble
(
java
.
lang
.
String
preamble
){
this
.
preamble
=
preamble
;
super
.
addValidField
(
"preamble"
);
}
/** featured_questions
*推荐问
*/
private
java
.
lang
.
String
featuredQuestions
;
@Column
(
name
=
"featured_questions"
,
length
=
1073741824
)
public
java
.
lang
.
String
getFeaturedQuestions
(){
return
this
.
featuredQuestions
;
}
public
void
setFeaturedQuestions
(
java
.
lang
.
String
featuredQuestions
){
this
.
featuredQuestions
=
featuredQuestions
;
super
.
addValidField
(
"featuredQuestions"
);
}
/** communication_turn
*对话上下文保存轮次 0-100
*/
private
java
.
lang
.
Integer
communicationTurn
;
@Column
(
name
=
"communication_turn"
,
length
=
10
)
public
java
.
lang
.
Integer
getCommunicationTurn
(){
return
this
.
communicationTurn
;
}
public
void
setCommunicationTurn
(
java
.
lang
.
Integer
communicationTurn
){
this
.
communicationTurn
=
communicationTurn
;
super
.
addValidField
(
"communicationTurn"
);
}
/** continuous_question_status
*追问状态 默认-default 自定义-customizable 关闭-close
*/
private
java
.
lang
.
String
continuousQuestionStatus
;
@Column
(
name
=
"continuous_question_status"
,
length
=
15
)
public
java
.
lang
.
String
getContinuousQuestionStatus
(){
return
this
.
continuousQuestionStatus
;
}
public
void
setContinuousQuestionStatus
(
java
.
lang
.
String
continuousQuestionStatus
){
this
.
continuousQuestionStatus
=
continuousQuestionStatus
;
super
.
addValidField
(
"continuousQuestionStatus"
);
}
/** continuous_question_system
*追问prompt
*/
private
java
.
lang
.
String
continuousQuestionSystem
;
@Column
(
name
=
"continuous_question_system"
,
length
=
2147483647
)
public
java
.
lang
.
String
getContinuousQuestionSystem
(){
return
this
.
continuousQuestionSystem
;
}
public
void
setContinuousQuestionSystem
(
java
.
lang
.
String
continuousQuestionSystem
){
this
.
continuousQuestionSystem
=
continuousQuestionSystem
;
super
.
addValidField
(
"continuousQuestionSystem"
);
}
/** continuous_question_turn
*追问轮次 1-5
*/
private
java
.
lang
.
Integer
continuousQuestionTurn
;
@Column
(
name
=
"continuous_question_turn"
,
length
=
10
)
public
java
.
lang
.
Integer
getContinuousQuestionTurn
(){
return
this
.
continuousQuestionTurn
;
}
public
void
setContinuousQuestionTurn
(
java
.
lang
.
Integer
continuousQuestionTurn
){
this
.
continuousQuestionTurn
=
continuousQuestionTurn
;
super
.
addValidField
(
"continuousQuestionTurn"
);
}
/** knowledge_ids
*知识库ID
*/
private
java
.
lang
.
String
knowledgeIds
;
@Column
(
name
=
"knowledge_ids"
,
length
=
1073741824
)
public
java
.
lang
.
String
getKnowledgeIds
(){
return
this
.
knowledgeIds
;
}
public
void
setKnowledgeIds
(
java
.
lang
.
String
knowledgeIds
){
this
.
knowledgeIds
=
knowledgeIds
;
super
.
addValidField
(
"knowledgeIds"
);
}
/** large_model
*问答模型
*/
private
java
.
lang
.
String
largeModel
;
@Column
(
name
=
"large_model"
,
length
=
25
)
public
java
.
lang
.
String
getLargeModel
(){
return
this
.
largeModel
;
}
public
void
setLargeModel
(
java
.
lang
.
String
largeModel
){
this
.
largeModel
=
largeModel
;
super
.
addValidField
(
"largeModel"
);
}
/** top_p
*对话模型 多样性 [0-1.00]
*/
private
java
.
lang
.
Float
topP
;
@Column
(
name
=
"top_p"
,
length
=
12
)
public
java
.
lang
.
Float
getTopP
(){
return
this
.
topP
;
}
public
void
setTopP
(
java
.
lang
.
Float
topP
){
this
.
topP
=
topP
;
super
.
addValidField
(
"topP"
);
}
/** unit_ids
*组件ID
*/
private
java
.
lang
.
String
unitIds
;
@Column
(
name
=
"unit_ids"
,
length
=
1073741824
)
public
java
.
lang
.
String
getUnitIds
(){
return
this
.
unitIds
;
}
public
void
setUnitIds
(
java
.
lang
.
String
unitIds
){
this
.
unitIds
=
unitIds
;
super
.
addValidField
(
"unitIds"
);
}
/** is_deleted
*是否删除 1、Y 是 2、N 否
*/
private
java
.
lang
.
String
isDeleted
;
@Column
(
name
=
"is_deleted"
,
length
=
1
)
public
java
.
lang
.
String
getIsDeleted
(){
return
this
.
isDeleted
;
}
public
void
setIsDeleted
(
java
.
lang
.
String
isDeleted
){
this
.
isDeleted
=
isDeleted
;
super
.
addValidField
(
"isDeleted"
);
}
/** CREATOR
*创建人
*/
private
java
.
lang
.
String
creator
;
@Column
(
name
=
"CREATOR"
,
length
=
225
)
public
java
.
lang
.
String
getCreator
(){
return
this
.
creator
;
}
public
void
setCreator
(
java
.
lang
.
String
creator
){
this
.
creator
=
creator
;
super
.
addValidField
(
"creator"
);
}
/** CREATED_TIME
*创建时间
*/
private
java
.
util
.
Date
createdTime
;
@Column
(
name
=
"CREATED_TIME"
,
length
=
19
)
public
java
.
util
.
Date
getCreatedTime
(){
return
this
.
createdTime
;
}
public
void
setCreatedTime
(
java
.
util
.
Date
createdTime
){
this
.
createdTime
=
createdTime
;
super
.
addValidField
(
"createdTime"
);
}
/** MODIFIER
*修改人
*/
private
java
.
lang
.
String
modifier
;
@Column
(
name
=
"MODIFIER"
,
length
=
225
)
public
java
.
lang
.
String
getModifier
(){
return
this
.
modifier
;
}
public
void
setModifier
(
java
.
lang
.
String
modifier
){
this
.
modifier
=
modifier
;
super
.
addValidField
(
"modifier"
);
}
/** MODIFIED_TIME
*修改时间
*/
private
java
.
util
.
Date
modifiedTime
;
@Column
(
name
=
"MODIFIED_TIME"
,
length
=
19
)
public
java
.
util
.
Date
getModifiedTime
(){
return
this
.
modifiedTime
;
}
public
void
setModifiedTime
(
java
.
util
.
Date
modifiedTime
){
this
.
modifiedTime
=
modifiedTime
;
super
.
addValidField
(
"modifiedTime"
);
}
/** SYS_VERSION
*乐观锁,版本号
*/
private
java
.
lang
.
Integer
sysVersion
;
@Column
(
name
=
"SYS_VERSION"
,
length
=
10
)
@Version
public
java
.
lang
.
Integer
getSysVersion
(){
return
this
.
sysVersion
;
}
public
void
setSysVersion
(
java
.
lang
.
Integer
sysVersion
){
this
.
sysVersion
=
sysVersion
;
super
.
addValidField
(
"sysVersion"
);
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/query/AgentApplicationInfoQuery.sql
0 → 100644
View file @
0f7b3735
select
distinct
id
,
member_id
,
agent_id
,
agent_avatar
,
agent_title
,
agent_desc
,
agent_system
,
agent_publish_status
,
publish_time
,
preamble
,
featured_questions
,
communication_turn
,
continuous_question_status
,
continuous_question_system
,
continuous_question_turn
,
knowledge_ids
,
large_model
,
top_p
,
unit_ids
,
is_deleted
,
CREATOR
,
CREATED_TIME
,
MODIFIER
,
MODIFIED_TIME
,
SYS_VERSION
from
biz_agent_application_info
where
is_deleted
=
'N'
<<
and
member_id
=
:
memberId
>>
<<
and
(
LOCATE
(:
query
,
agent_title
)
or
LOCATE
(:
query
,
agent_desc
))
>>
order
by
id
desc
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/query/AgentApplicationInfoQueryCondition.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
query
;
import
java.io.Serializable
;
/**
* Query Condition class for AgentApplicationInfoQuery
*/
public
class
AgentApplicationInfoQueryCondition
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
java
.
lang
.
Long
memberId
;
public
java
.
lang
.
Long
getMemberId
(){
return
this
.
memberId
;
}
public
void
setMemberId
(
java
.
lang
.
Long
memberId
){
this
.
memberId
=
memberId
;
}
private
java
.
lang
.
String
query
;
public
java
.
lang
.
String
getQuery
(){
return
this
.
query
;
}
public
void
setQuery
(
java
.
lang
.
String
query
){
this
.
query
=
query
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/query/AgentApplicationInfoQueryItem.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
query
;
import
java.io.Serializable
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
cn.com.yict.framemax.data.model.BaseItemClass
;
/**
* Query Item class for AgentApplicationInfoQuery
*/
@Entity
public
class
AgentApplicationInfoQueryItem
extends
BaseItemClass
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* id
* id
*/
private
java
.
lang
.
Integer
id
;
@Column
(
name
=
"id"
)
public
java
.
lang
.
Integer
getId
()
{
return
this
.
id
;
}
public
void
setId
(
java
.
lang
.
Integer
id
)
{
this
.
id
=
id
;
}
/**
* member_id
* member_id
*/
private
java
.
lang
.
Integer
memberId
;
@Column
(
name
=
"member_id"
)
public
java
.
lang
.
Integer
getMemberId
()
{
return
this
.
memberId
;
}
public
void
setMemberId
(
java
.
lang
.
Integer
memberId
)
{
this
.
memberId
=
memberId
;
}
/**
* agent_id
* agent_id
*/
private
java
.
lang
.
String
agentId
;
@Column
(
name
=
"agent_id"
)
public
java
.
lang
.
String
getAgentId
()
{
return
this
.
agentId
;
}
public
void
setAgentId
(
java
.
lang
.
String
agentId
)
{
this
.
agentId
=
agentId
;
}
/**
* agent_avatar
* agent_avatar
*/
private
java
.
lang
.
String
agentAvatar
;
@Column
(
name
=
"agent_avatar"
)
public
java
.
lang
.
String
getAgentAvatar
()
{
return
this
.
agentAvatar
;
}
public
void
setAgentAvatar
(
java
.
lang
.
String
agentAvatar
)
{
this
.
agentAvatar
=
agentAvatar
;
}
/**
* agent_title
* agent_title
*/
private
java
.
lang
.
String
agentTitle
;
@Column
(
name
=
"agent_title"
)
public
java
.
lang
.
String
getAgentTitle
()
{
return
this
.
agentTitle
;
}
public
void
setAgentTitle
(
java
.
lang
.
String
agentTitle
)
{
this
.
agentTitle
=
agentTitle
;
}
/**
* agent_desc
* agent_desc
*/
private
java
.
lang
.
String
agentDesc
;
@Column
(
name
=
"agent_desc"
)
public
java
.
lang
.
String
getAgentDesc
()
{
return
this
.
agentDesc
;
}
public
void
setAgentDesc
(
java
.
lang
.
String
agentDesc
)
{
this
.
agentDesc
=
agentDesc
;
}
/**
* agent_system
* agent_system
*/
private
java
.
lang
.
String
agentSystem
;
@Column
(
name
=
"agent_system"
)
public
java
.
lang
.
String
getAgentSystem
()
{
return
this
.
agentSystem
;
}
public
void
setAgentSystem
(
java
.
lang
.
String
agentSystem
)
{
this
.
agentSystem
=
agentSystem
;
}
/**
* agent_publish_status
* agent_publish_status
*/
private
java
.
lang
.
String
agentPublishStatus
;
@Column
(
name
=
"agent_publish_status"
)
public
java
.
lang
.
String
getAgentPublishStatus
()
{
return
this
.
agentPublishStatus
;
}
public
void
setAgentPublishStatus
(
java
.
lang
.
String
agentPublishStatus
)
{
this
.
agentPublishStatus
=
agentPublishStatus
;
}
/**
* publish_time
* 发布时间
*/
private
java
.
util
.
Date
publishTime
;
@Column
(
name
=
"publish_time"
)
public
java
.
util
.
Date
getPublishTime
()
{
return
this
.
publishTime
;
}
public
void
setPublishTime
(
java
.
util
.
Date
publishTime
)
{
this
.
publishTime
=
publishTime
;
}
/**
* preamble
* preamble
*/
private
java
.
lang
.
String
preamble
;
@Column
(
name
=
"preamble"
)
public
java
.
lang
.
String
getPreamble
()
{
return
this
.
preamble
;
}
public
void
setPreamble
(
java
.
lang
.
String
preamble
)
{
this
.
preamble
=
preamble
;
}
/**
* featured_questions
* featured_questions
*/
private
java
.
lang
.
String
featuredQuestions
;
@Column
(
name
=
"featured_questions"
)
public
java
.
lang
.
String
getFeaturedQuestions
()
{
return
this
.
featuredQuestions
;
}
public
void
setFeaturedQuestions
(
java
.
lang
.
String
featuredQuestions
)
{
this
.
featuredQuestions
=
featuredQuestions
;
}
/**
* communication_turn
* communication_turn
*/
private
java
.
lang
.
Integer
communicationTurn
;
@Column
(
name
=
"communication_turn"
)
public
java
.
lang
.
Integer
getCommunicationTurn
()
{
return
this
.
communicationTurn
;
}
public
void
setCommunicationTurn
(
java
.
lang
.
Integer
communicationTurn
)
{
this
.
communicationTurn
=
communicationTurn
;
}
/**
* continuous_question_status
* continuous_question_status
*/
private
java
.
lang
.
String
continuousQuestionStatus
;
@Column
(
name
=
"continuous_question_status"
)
public
java
.
lang
.
String
getContinuousQuestionStatus
()
{
return
this
.
continuousQuestionStatus
;
}
public
void
setContinuousQuestionStatus
(
java
.
lang
.
String
continuousQuestionStatus
)
{
this
.
continuousQuestionStatus
=
continuousQuestionStatus
;
}
/**
* continuous_question_system
* continuous_question_system
*/
private
java
.
lang
.
String
continuousQuestionSystem
;
@Column
(
name
=
"continuous_question_system"
)
public
java
.
lang
.
String
getContinuousQuestionSystem
()
{
return
this
.
continuousQuestionSystem
;
}
public
void
setContinuousQuestionSystem
(
java
.
lang
.
String
continuousQuestionSystem
)
{
this
.
continuousQuestionSystem
=
continuousQuestionSystem
;
}
/**
* continuous_question_turn
* continuous_question_turn
*/
private
java
.
lang
.
Integer
continuousQuestionTurn
;
@Column
(
name
=
"continuous_question_turn"
)
public
java
.
lang
.
Integer
getContinuousQuestionTurn
()
{
return
this
.
continuousQuestionTurn
;
}
public
void
setContinuousQuestionTurn
(
java
.
lang
.
Integer
continuousQuestionTurn
)
{
this
.
continuousQuestionTurn
=
continuousQuestionTurn
;
}
/**
* knowledge_ids
* knowledge_ids
*/
private
java
.
lang
.
String
knowledgeIds
;
@Column
(
name
=
"knowledge_ids"
)
public
java
.
lang
.
String
getKnowledgeIds
()
{
return
this
.
knowledgeIds
;
}
public
void
setKnowledgeIds
(
java
.
lang
.
String
knowledgeIds
)
{
this
.
knowledgeIds
=
knowledgeIds
;
}
/**
* large_model
* large_model
*/
private
java
.
lang
.
String
largeModel
;
@Column
(
name
=
"large_model"
)
public
java
.
lang
.
String
getLargeModel
()
{
return
this
.
largeModel
;
}
public
void
setLargeModel
(
java
.
lang
.
String
largeModel
)
{
this
.
largeModel
=
largeModel
;
}
/**
* top_p
* top_p
*/
private
java
.
lang
.
Float
topP
;
@Column
(
name
=
"top_p"
)
public
java
.
lang
.
Float
getTopP
()
{
return
this
.
topP
;
}
public
void
setTopP
(
java
.
lang
.
Float
topP
)
{
this
.
topP
=
topP
;
}
/**
* unit_ids
* unit_ids
*/
private
java
.
lang
.
String
unitIds
;
@Column
(
name
=
"unit_ids"
)
public
java
.
lang
.
String
getUnitIds
()
{
return
this
.
unitIds
;
}
public
void
setUnitIds
(
java
.
lang
.
String
unitIds
)
{
this
.
unitIds
=
unitIds
;
}
/**
* is_deleted
* is_deleted
*/
private
java
.
lang
.
String
isDeleted
;
@Column
(
name
=
"is_deleted"
)
public
java
.
lang
.
String
getIsDeleted
()
{
return
this
.
isDeleted
;
}
public
void
setIsDeleted
(
java
.
lang
.
String
isDeleted
)
{
this
.
isDeleted
=
isDeleted
;
}
/**
* CREATOR
* CREATOR
*/
private
java
.
lang
.
String
creator
;
@Column
(
name
=
"CREATOR"
)
public
java
.
lang
.
String
getCreator
()
{
return
this
.
creator
;
}
public
void
setCreator
(
java
.
lang
.
String
creator
)
{
this
.
creator
=
creator
;
}
/**
* CREATED_TIME
* CREATED_TIME
*/
private
java
.
util
.
Date
createdTime
;
@Column
(
name
=
"CREATED_TIME"
)
public
java
.
util
.
Date
getCreatedTime
()
{
return
this
.
createdTime
;
}
public
void
setCreatedTime
(
java
.
util
.
Date
createdTime
)
{
this
.
createdTime
=
createdTime
;
}
/**
* MODIFIER
* MODIFIER
*/
private
java
.
lang
.
String
modifier
;
@Column
(
name
=
"MODIFIER"
)
public
java
.
lang
.
String
getModifier
()
{
return
this
.
modifier
;
}
public
void
setModifier
(
java
.
lang
.
String
modifier
)
{
this
.
modifier
=
modifier
;
}
/**
* MODIFIED_TIME
* MODIFIED_TIME
*/
private
java
.
util
.
Date
modifiedTime
;
@Column
(
name
=
"MODIFIED_TIME"
)
public
java
.
util
.
Date
getModifiedTime
()
{
return
this
.
modifiedTime
;
}
public
void
setModifiedTime
(
java
.
util
.
Date
modifiedTime
)
{
this
.
modifiedTime
=
modifiedTime
;
}
/**
* SYS_VERSION
* SYS_VERSION
*/
private
java
.
lang
.
Integer
sysVersion
;
@Column
(
name
=
"SYS_VERSION"
)
public
java
.
lang
.
Integer
getSysVersion
()
{
return
this
.
sysVersion
;
}
public
void
setSysVersion
(
java
.
lang
.
Integer
sysVersion
)
{
this
.
sysVersion
=
sysVersion
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/repository/BizAgentApplicationDialoguesRecordRepository.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
repository
;
import
cn.com.yict.framemax.data.repository.Repository
;
import
cn.com.poc.agent_application.model.BizAgentApplicationDialoguesRecordModel
;
public
interface
BizAgentApplicationDialoguesRecordRepository
extends
Repository
<
BizAgentApplicationDialoguesRecordModel
,
java
.
lang
.
Long
>
{
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/repository/BizAgentApplicationLargeModelListRepository.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
repository
;
import
cn.com.yict.framemax.data.repository.Repository
;
import
cn.com.poc.agent_application.model.BizAgentApplicationLargeModelListModel
;
public
interface
BizAgentApplicationLargeModelListRepository
extends
Repository
<
BizAgentApplicationLargeModelListModel
,
java
.
lang
.
Integer
>
{
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/repository/BizAgentApplicationPublishRepository.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
repository
;
import
cn.com.yict.framemax.data.repository.Repository
;
import
cn.com.poc.agent_application.model.BizAgentApplicationPublishModel
;
public
interface
BizAgentApplicationPublishRepository
extends
Repository
<
BizAgentApplicationPublishModel
,
java
.
lang
.
Integer
>
{
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/rest/AgentApplicationInfoRest.java
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
rest
;
import
cn.com.poc.agent_application.dto.AgentApplicationInfoSearchDto
;
import
cn.com.poc.agent_application.dto.AgentApplicationPreviewDto
;
import
cn.com.poc.agent_application.dto.BizAgentApplicationLargeModelListDto
;
import
cn.com.yict.framemax.core.rest.BaseRest
;
import
cn.com.poc.agent_application.dto.AgentApplicationInfoDto
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
java.util.Collection
;
import
java.util.List
;
import
cn.com.yict.framemax.web.permission.Access
;
...
...
@@ -12,6 +14,8 @@ import cn.com.yict.framemax.web.permission.Permission;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
javax.servlet.http.HttpServletResponse
;
@Permission
(
value
=
Access
.
Safety
)
public
interface
AgentApplicationInfoRest
extends
BaseRest
{
...
...
@@ -23,7 +27,7 @@ public interface AgentApplicationInfoRest extends BaseRest {
/**
* 获取用户创建应用列表
*/
List
<
AgentApplicationInfoDto
>
getListByMember
(
@RequestBody
AgentApplicationInfoDto
dto
,
PagingInfo
pagingInfo
)
throws
Exception
;
List
<
AgentApplicationInfoDto
>
getListByMember
(
@RequestBody
AgentApplicationInfo
Search
Dto
dto
,
PagingInfo
pagingInfo
)
throws
Exception
;
/**
* 创建应用
...
...
@@ -45,4 +49,13 @@ public interface AgentApplicationInfoRest extends BaseRest {
*/
boolean
updateAndPublish
(
@RequestBody
AgentApplicationInfoDto
dto
)
throws
Exception
;
/**
* 应用预览
*/
void
preview
(
@RequestBody
AgentApplicationPreviewDto
dto
,
HttpServletResponse
response
)
throws
Exception
;
/**
* 获取应用模型列表
*/
List
<
BizAgentApplicationLargeModelListDto
>
getLargeModelList
()
throws
Exception
;
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/rest/BizAgentApplicationDialoguesRecordRest.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
rest
;
import
cn.com.yict.framemax.core.rest.BaseRest
;
import
cn.com.poc.agent_application.dto.BizAgentApplicationDialoguesRecordDto
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
java.util.Collection
;
import
java.util.List
;
import
cn.com.yict.framemax.web.permission.Access
;
import
cn.com.yict.framemax.web.permission.Permission
;
import
org.springframework.web.bind.annotation.RequestBody
;
public
interface
BizAgentApplicationDialoguesRecordRest
extends
BaseRest
{
BizAgentApplicationDialoguesRecordDto
getById
(
java
.
lang
.
Long
id
)
throws
Exception
;
List
<
BizAgentApplicationDialoguesRecordDto
>
getList
(
BizAgentApplicationDialoguesRecordDto
example
,
PagingInfo
pagingInfo
)
throws
Exception
;
BizAgentApplicationDialoguesRecordDto
save
(
BizAgentApplicationDialoguesRecordDto
dto
)
throws
Exception
;
BizAgentApplicationDialoguesRecordDto
update
(
BizAgentApplicationDialoguesRecordDto
dto
)
throws
Exception
;
void
deletedById
(
java
.
lang
.
Long
id
)
throws
Exception
;
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/rest/BizAgentApplicationPublishRest.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
rest
;
import
cn.com.yict.framemax.core.rest.BaseRest
;
import
cn.com.poc.agent_application.dto.BizAgentApplicationPublishDto
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
java.util.Collection
;
import
java.util.List
;
import
cn.com.yict.framemax.web.permission.Access
;
import
cn.com.yict.framemax.web.permission.Permission
;
import
org.springframework.web.bind.annotation.RequestBody
;
public
interface
BizAgentApplicationPublishRest
extends
BaseRest
{
BizAgentApplicationPublishDto
getById
(
java
.
lang
.
Integer
id
)
throws
Exception
;
List
<
BizAgentApplicationPublishDto
>
getList
(
BizAgentApplicationPublishDto
example
,
PagingInfo
pagingInfo
)
throws
Exception
;
BizAgentApplicationPublishDto
save
(
BizAgentApplicationPublishDto
dto
)
throws
Exception
;
BizAgentApplicationPublishDto
update
(
BizAgentApplicationPublishDto
dto
)
throws
Exception
;
void
deletedById
(
java
.
lang
.
Integer
id
)
throws
Exception
;
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/rest/impl/AgentApplicationInfoRestImpl.java
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
rest
.
impl
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
cn.com.poc.agent_application.constant.AgentApplicationConstants
;
import
cn.com.poc.agent_application.domain.AgentApplicationBaseInfo
;
import
cn.com.poc.agent_application.aggregate.AgentApplicationInfoService
;
import
cn.com.poc.agent_application.convert.AgentApplicationInfoConvert
;
import
cn.com.poc.agent_application.convert.BizAgentApplicationLargeModelListConvert
;
import
cn.com.poc.agent_application.dto.AgentApplicationInfoDto
;
import
cn.com.poc.agent_application.dto.AgentApplicationInfoSearchDto
;
import
cn.com.poc.agent_application.dto.AgentApplicationPreviewDto
;
import
cn.com.poc.agent_application.dto.BizAgentApplicationLargeModelListDto
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationInfoEntity
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationLargeModelListEntity
;
import
cn.com.poc.agent_application.query.AgentApplicationInfoQueryCondition
;
import
cn.com.poc.agent_application.rest.AgentApplicationInfoRest
;
import
cn.com.poc.agent_application.service.BizAgentApplicationInfoService
;
import
cn.com.poc.agent_application.service.BizAgentApplicationLargeModelListService
;
import
cn.com.poc.common.utils.BlContext
;
import
cn.com.poc.support.security.oauth.entity.UserBaseEntity
;
import
cn.com.yict.framemax.core.exception.BusinessException
;
import
org.springframework.stereotype.Component
;
import
cn.com.poc.agent_application.rest.AgentApplicationInfoRest
;
import
cn.com.poc.agent_application.service.BizAgentApplicationInfoService
;
import
cn.com.poc.agent_application.dto.AgentApplicationInfoDto
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationInfoEntity
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
cn.com.poc.agent_application.convert.AgentApplicationInfoConvert
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.Assert
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
org.springframework.util.Assert
;
import
org.springframework.util.StringUtils
;
@Component
public
class
AgentApplicationInfoRestImpl
implements
AgentApplicationInfoRest
{
@Resource
private
BizAgentApplicationInfoService
bizAgentApplicationInfoService
;
@Resource
private
AgentApplicationInfoService
agentApplicationInfoService
;
@Resource
private
BizAgentApplicationLargeModelListService
bizAgentApplicationLargeModelListService
;
public
List
<
AgentApplicationInfoDto
>
getListByMember
(
AgentApplicationInfoDto
dto
,
PagingInfo
pagingInfo
)
throws
Exception
{
public
List
<
AgentApplicationInfoDto
>
getListByMember
(
AgentApplicationInfo
Search
Dto
dto
,
PagingInfo
pagingInfo
)
throws
Exception
{
UserBaseEntity
userBaseEntity
=
BlContext
.
getCurrentUserNotException
();
Long
userId
=
userBaseEntity
.
getUserId
();
if
(
dto
.
getBaseInfo
()
==
null
)
{
dto
.
setBaseInfo
(
new
AgentApplicationBaseInfo
());
AgentApplicationInfoQueryCondition
condition
=
new
AgentApplicationInfoQueryCondition
();
condition
.
setMemberId
(
userId
);
if
(!
StringUtils
.
isEmpty
(
dto
.
getQuery
()))
{
condition
.
setQuery
(
dto
.
getQuery
());
}
dto
.
getBaseInfo
().
setMemberId
(
userId
.
intValue
());
return
bizAgentApplicationInfoService
.
findByExample
(
AgentApplicationInfoConvert
.
dtoToEntity
(
dto
),
pagingInfo
)
.
stream
()
.
map
(
AgentApplicationInfoConvert:
:
entityToDto
)
.
collect
(
Collectors
.
toList
());
List
<
BizAgentApplicationInfoEntity
>
bizAgentApplicationInfoEntities
=
bizAgentApplicationInfoService
.
agentApplicationInfoQuery
(
condition
,
pagingInfo
);
List
<
AgentApplicationInfoDto
>
result
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
bizAgentApplicationInfoEntities
))
{
result
=
bizAgentApplicationInfoEntities
.
stream
().
map
(
AgentApplicationInfoConvert:
:
entityToDto
).
collect
(
Collectors
.
toList
());
}
return
result
;
}
public
AgentApplicationInfoDto
saveOrUpdate
(
AgentApplicationInfoDto
dto
)
throws
Exception
{
...
...
@@ -92,13 +109,40 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
Assert
.
notNull
(
dto
.
getCommConfig
());
Assert
.
notNull
(
dto
.
getCommModelConfig
());
Assert
.
notNull
(
dto
.
getKnowledgeConfig
());
UserBaseEntity
userBaseEntity
=
BlContext
.
getCurrentUserNotException
();
Long
userId
=
userBaseEntity
.
getUserId
();
dto
.
getBaseInfo
().
setMemberId
(
userId
.
intValue
());
dto
.
getBaseInfo
().
setAgentPublishStatus
(
AgentApplicationConstants
.
AGENT_PUBLISH_STATUS
.
PUBLISH
);
if
(
null
==
bizAgentApplicationInfoService
.
update
(
AgentApplicationInfoConvert
.
dtoToEntity
(
dto
)))
{
throw
new
BusinessException
(
"发布失败"
);
}
BizAgentApplicationInfoEntity
bizAgentApplicationInfoEntity
=
AgentApplicationInfoConvert
.
dtoToEntity
(
dto
);
agentApplicationInfoService
.
updateAndPublish
(
bizAgentApplicationInfoEntity
);
return
true
;
}
@Override
public
void
preview
(
AgentApplicationPreviewDto
dto
,
HttpServletResponse
httpServletResponse
)
throws
IOException
{
Assert
.
notNull
(
dto
);
Assert
.
notNull
(
dto
.
getAgentId
());
Assert
.
notEmpty
(
dto
.
getMessages
());
try
{
String
agentId
=
dto
.
getAgentId
();
BizAgentApplicationInfoEntity
infoEntity
=
bizAgentApplicationInfoService
.
getByAgentId
(
agentId
);
if
(
infoEntity
==
null
)
{
throw
new
BusinessException
(
"应用不存在"
);
}
agentApplicationInfoService
.
callAgentApplication
(
infoEntity
.
getLargeModel
(),
infoEntity
.
getUnitIds
()
,
infoEntity
.
getAgentSystem
(),
infoEntity
.
getKnowledgeIds
(),
infoEntity
.
getCommunicationTurn
(),
infoEntity
.
getTopP
()
,
dto
.
getMessages
(),
httpServletResponse
);
}
catch
(
Exception
e
)
{
httpServletResponse
.
setContentType
(
"text/event-stream"
);
PrintWriter
writer
=
httpServletResponse
.
getWriter
();
writer
.
write
(
"data: {\"code\":-1,\"message\":\""
+
e
.
getMessage
()
+
"\"} \n\n"
);
writer
.
write
(
"data: [DONE]\n\n"
);
writer
.
flush
();
}
}
@Override
public
List
<
BizAgentApplicationLargeModelListDto
>
getLargeModelList
()
throws
Exception
{
return
bizAgentApplicationLargeModelListService
.
findByExample
(
new
BizAgentApplicationLargeModelListEntity
(),
null
)
.
stream
()
.
map
(
BizAgentApplicationLargeModelListConvert:
:
entityToDto
)
.
collect
(
Collectors
.
toList
());
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/rest/impl/BizAgentApplicationDialoguesRecordRestImpl.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
rest
.
impl
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Component
;
import
cn.com.poc.agent_application.rest.BizAgentApplicationDialoguesRecordRest
;
import
cn.com.poc.agent_application.service.BizAgentApplicationDialoguesRecordService
;
import
cn.com.poc.agent_application.dto.BizAgentApplicationDialoguesRecordDto
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationDialoguesRecordEntity
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
cn.com.poc.agent_application.convert.BizAgentApplicationDialoguesRecordConvert
;
import
java.util.stream.Collectors
;
import
org.springframework.util.Assert
;
@Component
public
class
BizAgentApplicationDialoguesRecordRestImpl
implements
BizAgentApplicationDialoguesRecordRest
{
@Resource
private
BizAgentApplicationDialoguesRecordService
service
;
public
BizAgentApplicationDialoguesRecordDto
getById
(
java
.
lang
.
Long
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
return
BizAgentApplicationDialoguesRecordConvert
.
entityToDto
(
service
.
get
(
id
));
}
public
List
<
BizAgentApplicationDialoguesRecordDto
>
getList
(
BizAgentApplicationDialoguesRecordDto
dto
,
PagingInfo
pagingInfo
)
throws
Exception
{
return
service
.
findByExample
(
BizAgentApplicationDialoguesRecordConvert
.
dtoToEntity
(
dto
),
pagingInfo
)
.
stream
()
.
map
(
BizAgentApplicationDialoguesRecordConvert:
:
entityToDto
)
.
collect
(
Collectors
.
toList
());
}
public
BizAgentApplicationDialoguesRecordDto
save
(
BizAgentApplicationDialoguesRecordDto
dto
)
throws
Exception
{
Assert
.
notNull
(
dto
);
BizAgentApplicationDialoguesRecordEntity
entity
=
BizAgentApplicationDialoguesRecordConvert
.
dtoToEntity
(
dto
);
return
BizAgentApplicationDialoguesRecordConvert
.
entityToDto
(
service
.
save
(
entity
));
}
public
BizAgentApplicationDialoguesRecordDto
update
(
BizAgentApplicationDialoguesRecordDto
dto
)
throws
Exception
{
Assert
.
notNull
(
dto
);
BizAgentApplicationDialoguesRecordEntity
entity
=
BizAgentApplicationDialoguesRecordConvert
.
dtoToEntity
(
dto
);
return
BizAgentApplicationDialoguesRecordConvert
.
entityToDto
(
service
.
update
(
entity
));
}
public
void
deletedById
(
java
.
lang
.
Long
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
service
.
deletedById
(
id
);
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/rest/impl/BizAgentApplicationPublishRestImpl.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
rest
.
impl
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Component
;
import
cn.com.poc.agent_application.rest.BizAgentApplicationPublishRest
;
import
cn.com.poc.agent_application.service.BizAgentApplicationPublishService
;
import
cn.com.poc.agent_application.dto.BizAgentApplicationPublishDto
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationPublishEntity
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
cn.com.poc.agent_application.convert.BizAgentApplicationPublishConvert
;
import
java.util.stream.Collectors
;
import
org.springframework.util.Assert
;
@Component
public
class
BizAgentApplicationPublishRestImpl
implements
BizAgentApplicationPublishRest
{
@Resource
private
BizAgentApplicationPublishService
service
;
public
BizAgentApplicationPublishDto
getById
(
java
.
lang
.
Integer
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
return
BizAgentApplicationPublishConvert
.
entityToDto
(
service
.
get
(
id
));
}
public
List
<
BizAgentApplicationPublishDto
>
getList
(
BizAgentApplicationPublishDto
dto
,
PagingInfo
pagingInfo
)
throws
Exception
{
return
service
.
findByExample
(
BizAgentApplicationPublishConvert
.
dtoToEntity
(
dto
),
pagingInfo
)
.
stream
()
.
map
(
BizAgentApplicationPublishConvert:
:
entityToDto
)
.
collect
(
Collectors
.
toList
());
}
public
BizAgentApplicationPublishDto
save
(
BizAgentApplicationPublishDto
dto
)
throws
Exception
{
Assert
.
notNull
(
dto
);
BizAgentApplicationPublishEntity
entity
=
BizAgentApplicationPublishConvert
.
dtoToEntity
(
dto
);
return
BizAgentApplicationPublishConvert
.
entityToDto
(
service
.
save
(
entity
));
}
public
BizAgentApplicationPublishDto
update
(
BizAgentApplicationPublishDto
dto
)
throws
Exception
{
Assert
.
notNull
(
dto
);
BizAgentApplicationPublishEntity
entity
=
BizAgentApplicationPublishConvert
.
dtoToEntity
(
dto
);
return
BizAgentApplicationPublishConvert
.
entityToDto
(
service
.
update
(
entity
));
}
public
void
deletedById
(
java
.
lang
.
Integer
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
service
.
deletedById
(
id
);
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/service/BizAgentApplicationDialoguesRecordService.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
service
;
import
cn.com.yict.framemax.core.service.BaseService
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationDialoguesRecordEntity
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
java.util.Collection
;
import
java.util.List
;
public
interface
BizAgentApplicationDialoguesRecordService
extends
BaseService
{
BizAgentApplicationDialoguesRecordEntity
get
(
java
.
lang
.
Long
id
)
throws
Exception
;
List
<
BizAgentApplicationDialoguesRecordEntity
>
findByExample
(
BizAgentApplicationDialoguesRecordEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
;
BizAgentApplicationDialoguesRecordEntity
save
(
BizAgentApplicationDialoguesRecordEntity
entity
)
throws
Exception
;
BizAgentApplicationDialoguesRecordEntity
update
(
BizAgentApplicationDialoguesRecordEntity
entity
)
throws
Exception
;
void
deletedById
(
java
.
lang
.
Long
id
)
throws
Exception
;
List
<
BizAgentApplicationDialoguesRecordEntity
>
getRecord
(
String
agentId
,
Integer
turn
);
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/service/BizAgentApplicationInfoService.java
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
service
;
import
cn.com.poc.agent_application.constant.AgentApplicationConstants
;
import
cn.com.poc.agent_application.query.AgentApplicationInfoQueryCondition
;
import
cn.com.poc.agent_application.query.AgentApplicationInfoQueryItem
;
import
cn.com.yict.framemax.core.service.BaseService
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationInfoEntity
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
...
...
@@ -12,6 +15,8 @@ public interface BizAgentApplicationInfoService extends BaseService {
List
<
BizAgentApplicationInfoEntity
>
findByExample
(
BizAgentApplicationInfoEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
;
List
<
BizAgentApplicationInfoEntity
>
agentApplicationInfoQuery
(
AgentApplicationInfoQueryCondition
condition
,
PagingInfo
pagingInfo
);
BizAgentApplicationInfoEntity
save
(
BizAgentApplicationInfoEntity
entity
)
throws
Exception
;
BizAgentApplicationInfoEntity
update
(
BizAgentApplicationInfoEntity
entity
)
throws
Exception
;
...
...
src/main/java/cn/com/poc/agent_application/service/BizAgentApplicationLargeModelListService.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
service
;
import
cn.com.yict.framemax.core.service.BaseService
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationLargeModelListEntity
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
java.util.Collection
;
import
java.util.List
;
public
interface
BizAgentApplicationLargeModelListService
extends
BaseService
{
BizAgentApplicationLargeModelListEntity
get
(
java
.
lang
.
Integer
id
)
throws
Exception
;
List
<
BizAgentApplicationLargeModelListEntity
>
findByExample
(
BizAgentApplicationLargeModelListEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
;
BizAgentApplicationLargeModelListEntity
save
(
BizAgentApplicationLargeModelListEntity
entity
)
throws
Exception
;
BizAgentApplicationLargeModelListEntity
update
(
BizAgentApplicationLargeModelListEntity
entity
)
throws
Exception
;
void
deletedById
(
java
.
lang
.
Integer
id
)
throws
Exception
;
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/service/BizAgentApplicationPublishService.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
service
;
import
cn.com.yict.framemax.core.service.BaseService
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationPublishEntity
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
java.util.Collection
;
import
java.util.List
;
public
interface
BizAgentApplicationPublishService
extends
BaseService
{
BizAgentApplicationPublishEntity
get
(
java
.
lang
.
Integer
id
)
throws
Exception
;
BizAgentApplicationPublishEntity
getByAgentId
(
String
agentId
)
throws
Exception
;
List
<
BizAgentApplicationPublishEntity
>
findByExample
(
BizAgentApplicationPublishEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
;
BizAgentApplicationPublishEntity
save
(
BizAgentApplicationPublishEntity
entity
)
throws
Exception
;
BizAgentApplicationPublishEntity
update
(
BizAgentApplicationPublishEntity
entity
)
throws
Exception
;
void
deletedById
(
java
.
lang
.
Integer
id
)
throws
Exception
;
void
deleteByAgentId
(
String
agentId
)
throws
Exception
;
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/service/impl/BizAgentApplicationDialoguesRecordServiceImpl.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
service
.
impl
;
import
cn.com.yict.framemax.core.service.impl.BaseServiceImpl
;
import
cn.com.poc.agent_application.service.BizAgentApplicationDialoguesRecordService
;
import
cn.com.poc.agent_application.model.BizAgentApplicationDialoguesRecordModel
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationDialoguesRecordEntity
;
import
cn.com.poc.agent_application.convert.BizAgentApplicationDialoguesRecordConvert
;
import
cn.com.poc.agent_application.repository.BizAgentApplicationDialoguesRecordRepository
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
org.springframework.stereotype.Service
;
import
org.apache.commons.collections4.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.stream.Collectors
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
org.springframework.util.Assert
;
@Service
public
class
BizAgentApplicationDialoguesRecordServiceImpl
extends
BaseServiceImpl
implements
BizAgentApplicationDialoguesRecordService
{
@Resource
private
BizAgentApplicationDialoguesRecordRepository
repository
;
public
BizAgentApplicationDialoguesRecordEntity
get
(
java
.
lang
.
Long
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
BizAgentApplicationDialoguesRecordModel
model
=
this
.
repository
.
get
(
id
);
if
(
model
==
null
){
return
null
;
}
if
(
"Y"
.
equals
(
model
.
getIsDeleted
())){
return
null
;
}
return
BizAgentApplicationDialoguesRecordConvert
.
modelToEntity
(
model
);
}
public
List
<
BizAgentApplicationDialoguesRecordEntity
>
findByExample
(
BizAgentApplicationDialoguesRecordEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
{
List
<
BizAgentApplicationDialoguesRecordEntity
>
result
=
new
ArrayList
<
BizAgentApplicationDialoguesRecordEntity
>();
BizAgentApplicationDialoguesRecordModel
model
=
new
BizAgentApplicationDialoguesRecordModel
();
if
(
example
!=
null
){
model
=
BizAgentApplicationDialoguesRecordConvert
.
entityToModel
(
example
);
}
model
.
setIsDeleted
(
"N"
);
List
<
BizAgentApplicationDialoguesRecordModel
>
models
=
this
.
repository
.
findByExample
(
model
,
"timestamp asc"
,
pagingInfo
);
if
(
CollectionUtils
.
isNotEmpty
(
models
))
{
result
=
models
.
stream
().
map
(
BizAgentApplicationDialoguesRecordConvert:
:
modelToEntity
).
collect
(
Collectors
.
toList
());
}
return
result
;
}
public
BizAgentApplicationDialoguesRecordEntity
save
(
BizAgentApplicationDialoguesRecordEntity
entity
)
throws
Exception
{
Assert
.
notNull
(
entity
);
entity
.
setId
(
null
);
entity
.
setIsDeleted
(
"N"
);
BizAgentApplicationDialoguesRecordModel
model
=
BizAgentApplicationDialoguesRecordConvert
.
entityToModel
(
entity
);
BizAgentApplicationDialoguesRecordModel
saveModel
=
this
.
repository
.
save
(
model
);
return
BizAgentApplicationDialoguesRecordConvert
.
modelToEntity
(
saveModel
);
}
public
BizAgentApplicationDialoguesRecordEntity
update
(
BizAgentApplicationDialoguesRecordEntity
entity
)
throws
Exception
{
Assert
.
notNull
(
entity
);
Assert
.
notNull
(
entity
.
getId
(),
"update pk can not be null"
);
BizAgentApplicationDialoguesRecordModel
model
=
this
.
repository
.
get
(
entity
.
getId
());
if
(
entity
.
getRole
()
!=
null
){
model
.
setRole
(
entity
.
getRole
());
}
if
(
entity
.
getAgentId
()
!=
null
){
model
.
setAgentId
(
entity
.
getAgentId
());
}
if
(
entity
.
getMemberId
()
!=
null
){
model
.
setMemberId
(
entity
.
getMemberId
());
}
if
(
entity
.
getContent
()
!=
null
){
model
.
setContent
(
entity
.
getContent
());
}
if
(
entity
.
getTimestamp
()
!=
null
){
model
.
setTimestamp
(
entity
.
getTimestamp
());
}
if
(
entity
.
getIsDeleted
()
!=
null
){
model
.
setIsDeleted
(
entity
.
getIsDeleted
());
}
if
(
entity
.
getCreator
()
!=
null
){
model
.
setCreator
(
entity
.
getCreator
());
}
if
(
entity
.
getCreatedTime
()
!=
null
){
model
.
setCreatedTime
(
entity
.
getCreatedTime
());
}
if
(
entity
.
getModifier
()
!=
null
){
model
.
setModifier
(
entity
.
getModifier
());
}
if
(
entity
.
getModifiedTime
()
!=
null
){
model
.
setModifiedTime
(
entity
.
getModifiedTime
());
}
if
(
entity
.
getSysVersion
()
!=
null
){
model
.
setSysVersion
(
entity
.
getSysVersion
());
}
BizAgentApplicationDialoguesRecordModel
saveModel
=
this
.
repository
.
save
(
model
);
return
BizAgentApplicationDialoguesRecordConvert
.
modelToEntity
(
saveModel
);
}
public
void
deletedById
(
java
.
lang
.
Long
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
BizAgentApplicationDialoguesRecordModel
model
=
this
.
repository
.
get
(
id
);
if
(
model
!=
null
){
if
(
"N"
.
equals
(
model
.
getIsDeleted
())){
model
.
setIsDeleted
(
"Y"
);
this
.
repository
.
save
(
model
);
}
}
}
@Override
public
List
<
BizAgentApplicationDialoguesRecordEntity
>
getRecord
(
String
agentId
,
Integer
turn
)
{
return
null
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/service/impl/BizAgentApplicationInfoServiceImpl.java
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
service
.
impl
;
import
cn.com.poc.agent_application.constant.AgentApplicationConstants
;
import
cn.com.poc.agent_application.query.AgentApplicationInfoQueryCondition
;
import
cn.com.poc.agent_application.query.AgentApplicationInfoQueryItem
;
import
cn.com.poc.common.constant.CommonConstant
;
import
cn.com.poc.common.utils.JsonUtils
;
import
cn.com.poc.common.utils.UUIDTool
;
...
...
@@ -75,14 +77,24 @@ public class BizAgentApplicationInfoServiceImpl extends BaseServiceImpl
return
result
;
}
@Override
public
List
<
BizAgentApplicationInfoEntity
>
agentApplicationInfoQuery
(
AgentApplicationInfoQueryCondition
condition
,
PagingInfo
pagingInfo
)
{
List
<
BizAgentApplicationInfoEntity
>
result
=
new
ArrayList
<>();
List
<
AgentApplicationInfoQueryItem
>
items
=
this
.
sqlDao
.
query
(
condition
,
AgentApplicationInfoQueryItem
.
class
,
pagingInfo
);
if
(
CollectionUtils
.
isNotEmpty
(
items
))
{
result
=
items
.
stream
().
map
(
AgentApplicationInfoConvert:
:
queryItemToEntity
).
collect
(
Collectors
.
toList
());
}
return
result
;
}
@Override
public
BizAgentApplicationInfoEntity
save
(
BizAgentApplicationInfoEntity
entity
)
throws
Exception
{
Assert
.
notNull
(
entity
);
entity
.
setId
(
null
);
entity
.
setIsDeleted
(
"N"
);
entity
.
setAgentId
(
UUIDTool
.
getUUID
());
BizAgentApplicationInfoModel
model
=
new
BizAgentApplicationInfoModel
();
paramVerificationAndConvert
(
entity
,
model
);
model
.
setAgentId
(
UUIDTool
.
getUUID
());
BizAgentApplicationInfoModel
saveModel
=
this
.
repository
.
save
(
model
);
return
AgentApplicationInfoConvert
.
modelToEntity
(
saveModel
);
}
...
...
@@ -138,6 +150,9 @@ public class BizAgentApplicationInfoServiceImpl extends BaseServiceImpl
* @param model
*/
private
void
paramVerificationAndConvert
(
BizAgentApplicationInfoEntity
entity
,
BizAgentApplicationInfoModel
model
)
{
if
(
entity
.
getMemberId
()
!=
null
)
{
model
.
setMemberId
(
entity
.
getMemberId
());
}
if
(
StringUtils
.
isNotBlank
(
entity
.
getAgentTitle
()))
{
model
.
setAgentTitle
(
entity
.
getAgentTitle
());
}
...
...
@@ -147,6 +162,9 @@ public class BizAgentApplicationInfoServiceImpl extends BaseServiceImpl
if
(
StringUtils
.
isNotBlank
(
entity
.
getAgentSystem
()))
{
model
.
setAgentSystem
(
entity
.
getAgentSystem
());
}
if
(
StringUtils
.
isNotBlank
(
entity
.
getAgentAvatar
()))
{
model
.
setAgentAvatar
(
entity
.
getAgentAvatar
());
}
if
(
StringUtils
.
isNotBlank
(
entity
.
getAgentPublishStatus
()))
{
Assert
.
isTrue
(
AgentApplicationConstants
.
AGENT_PUBLISH_STATUS
.
isPublishStatus
(
entity
.
getAgentPublishStatus
()),
"Agent publish status is error"
);
model
.
setAgentPublishStatus
(
entity
.
getAgentPublishStatus
());
...
...
src/main/java/cn/com/poc/agent_application/service/impl/BizAgentApplicationLargeModelListServiceImpl.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
service
.
impl
;
import
cn.com.yict.framemax.core.service.impl.BaseServiceImpl
;
import
cn.com.poc.agent_application.service.BizAgentApplicationLargeModelListService
;
import
cn.com.poc.agent_application.model.BizAgentApplicationLargeModelListModel
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationLargeModelListEntity
;
import
cn.com.poc.agent_application.convert.BizAgentApplicationLargeModelListConvert
;
import
cn.com.poc.agent_application.repository.BizAgentApplicationLargeModelListRepository
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
org.springframework.stereotype.Service
;
import
org.apache.commons.collections4.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.stream.Collectors
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
org.springframework.util.Assert
;
@Service
public
class
BizAgentApplicationLargeModelListServiceImpl
extends
BaseServiceImpl
implements
BizAgentApplicationLargeModelListService
{
@Resource
private
BizAgentApplicationLargeModelListRepository
repository
;
public
BizAgentApplicationLargeModelListEntity
get
(
java
.
lang
.
Integer
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
BizAgentApplicationLargeModelListModel
model
=
this
.
repository
.
get
(
id
);
if
(
model
==
null
){
return
null
;
}
return
BizAgentApplicationLargeModelListConvert
.
modelToEntity
(
model
);
}
public
List
<
BizAgentApplicationLargeModelListEntity
>
findByExample
(
BizAgentApplicationLargeModelListEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
{
List
<
BizAgentApplicationLargeModelListEntity
>
result
=
new
ArrayList
<
BizAgentApplicationLargeModelListEntity
>();
BizAgentApplicationLargeModelListModel
model
=
new
BizAgentApplicationLargeModelListModel
();
if
(
example
!=
null
){
model
=
BizAgentApplicationLargeModelListConvert
.
entityToModel
(
example
);
}
List
<
BizAgentApplicationLargeModelListModel
>
models
=
this
.
repository
.
findByExample
(
model
,
pagingInfo
);
if
(
CollectionUtils
.
isNotEmpty
(
models
))
{
result
=
models
.
stream
().
map
(
BizAgentApplicationLargeModelListConvert:
:
modelToEntity
).
collect
(
Collectors
.
toList
());
}
return
result
;
}
public
BizAgentApplicationLargeModelListEntity
save
(
BizAgentApplicationLargeModelListEntity
entity
)
throws
Exception
{
Assert
.
notNull
(
entity
);
entity
.
setId
(
null
);
BizAgentApplicationLargeModelListModel
model
=
BizAgentApplicationLargeModelListConvert
.
entityToModel
(
entity
);
BizAgentApplicationLargeModelListModel
saveModel
=
this
.
repository
.
save
(
model
);
return
BizAgentApplicationLargeModelListConvert
.
modelToEntity
(
saveModel
);
}
public
BizAgentApplicationLargeModelListEntity
update
(
BizAgentApplicationLargeModelListEntity
entity
)
throws
Exception
{
Assert
.
notNull
(
entity
);
Assert
.
notNull
(
entity
.
getId
(),
"update pk can not be null"
);
BizAgentApplicationLargeModelListModel
model
=
this
.
repository
.
get
(
entity
.
getId
());
if
(
entity
.
getModelName
()
!=
null
){
model
.
setModelName
(
entity
.
getModelName
());
}
if
(
entity
.
getOwner
()
!=
null
){
model
.
setOwner
(
entity
.
getOwner
());
}
BizAgentApplicationLargeModelListModel
saveModel
=
this
.
repository
.
save
(
model
);
return
BizAgentApplicationLargeModelListConvert
.
modelToEntity
(
saveModel
);
}
public
void
deletedById
(
java
.
lang
.
Integer
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
BizAgentApplicationLargeModelListModel
model
=
this
.
repository
.
get
(
id
);
if
(
model
!=
null
){
}
}
}
\ No newline at end of file
src/main/java/cn/com/poc/agent_application/service/impl/BizAgentApplicationPublishServiceImpl.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
agent_application
.
service
.
impl
;
import
cn.com.poc.agent_application.constant.AgentApplicationConstants
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationInfoEntity
;
import
cn.com.poc.agent_application.model.BizAgentApplicationInfoModel
;
import
cn.com.poc.common.constant.CommonConstant
;
import
cn.com.poc.common.utils.JsonUtils
;
import
cn.com.yict.framemax.core.exception.BusinessException
;
import
cn.com.yict.framemax.core.service.impl.BaseServiceImpl
;
import
cn.com.poc.agent_application.service.BizAgentApplicationPublishService
;
import
cn.com.poc.agent_application.model.BizAgentApplicationPublishModel
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationPublishEntity
;
import
cn.com.poc.agent_application.convert.BizAgentApplicationPublishConvert
;
import
cn.com.poc.agent_application.repository.BizAgentApplicationPublishRepository
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.apache.commons.collections4.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.stream.Collectors
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
org.springframework.util.Assert
;
@Service
public
class
BizAgentApplicationPublishServiceImpl
extends
BaseServiceImpl
implements
BizAgentApplicationPublishService
{
@Resource
private
BizAgentApplicationPublishRepository
repository
;
public
BizAgentApplicationPublishEntity
get
(
java
.
lang
.
Integer
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
BizAgentApplicationPublishModel
model
=
this
.
repository
.
get
(
id
);
if
(
model
==
null
)
{
return
null
;
}
if
(
"Y"
.
equals
(
model
.
getIsDeleted
()))
{
return
null
;
}
return
BizAgentApplicationPublishConvert
.
modelToEntity
(
model
);
}
@Override
public
BizAgentApplicationPublishEntity
getByAgentId
(
String
agentId
)
throws
Exception
{
Assert
.
notNull
(
agentId
);
BizAgentApplicationPublishModel
model
=
new
BizAgentApplicationPublishModel
();
model
.
setAgentId
(
agentId
);
model
.
setIsDeleted
(
CommonConstant
.
IsDeleted
.
N
);
List
<
BizAgentApplicationPublishModel
>
models
=
this
.
repository
.
findByExample
(
model
);
if
(
CollectionUtils
.
isEmpty
(
models
))
{
return
null
;
}
return
BizAgentApplicationPublishConvert
.
modelToEntity
(
models
.
get
(
0
));
}
public
List
<
BizAgentApplicationPublishEntity
>
findByExample
(
BizAgentApplicationPublishEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
{
List
<
BizAgentApplicationPublishEntity
>
result
=
new
ArrayList
<
BizAgentApplicationPublishEntity
>();
BizAgentApplicationPublishModel
model
=
new
BizAgentApplicationPublishModel
();
if
(
example
!=
null
)
{
model
=
BizAgentApplicationPublishConvert
.
entityToModel
(
example
);
}
model
.
setIsDeleted
(
"N"
);
List
<
BizAgentApplicationPublishModel
>
models
=
this
.
repository
.
findByExample
(
model
,
pagingInfo
);
if
(
CollectionUtils
.
isNotEmpty
(
models
))
{
result
=
models
.
stream
().
map
(
BizAgentApplicationPublishConvert:
:
modelToEntity
).
collect
(
Collectors
.
toList
());
}
return
result
;
}
public
BizAgentApplicationPublishEntity
save
(
BizAgentApplicationPublishEntity
entity
)
throws
Exception
{
Assert
.
notNull
(
entity
);
entity
.
setId
(
null
);
entity
.
setIsDeleted
(
"N"
);
BizAgentApplicationPublishModel
model
=
BizAgentApplicationPublishConvert
.
entityToModel
(
entity
);
BizAgentApplicationPublishModel
saveModel
=
this
.
repository
.
save
(
model
);
return
BizAgentApplicationPublishConvert
.
modelToEntity
(
saveModel
);
}
public
BizAgentApplicationPublishEntity
update
(
BizAgentApplicationPublishEntity
entity
)
throws
Exception
{
Assert
.
notNull
(
entity
);
Assert
.
notNull
(
entity
.
getId
(),
"update pk can not be null"
);
BizAgentApplicationPublishModel
model
=
this
.
repository
.
get
(
entity
.
getId
());
model
.
setAgentId
(
entity
.
getAgentId
());
model
.
setIsDeleted
(
CommonConstant
.
IsDeleted
.
N
);
List
<
BizAgentApplicationPublishModel
>
models
=
this
.
repository
.
findByExample
(
model
);
if
(
CollectionUtils
.
isEmpty
(
models
))
{
throw
new
BusinessException
(
"数据不存在"
);
}
model
=
models
.
get
(
0
);
paramVerificationAndConvert
(
entity
,
model
);
BizAgentApplicationPublishModel
saveModel
=
this
.
repository
.
save
(
model
);
return
BizAgentApplicationPublishConvert
.
modelToEntity
(
saveModel
);
}
public
void
deletedById
(
java
.
lang
.
Integer
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
BizAgentApplicationPublishModel
model
=
this
.
repository
.
get
(
id
);
if
(
model
!=
null
)
{
if
(
"N"
.
equals
(
model
.
getIsDeleted
()))
{
model
.
setIsDeleted
(
"Y"
);
this
.
repository
.
save
(
model
);
}
}
}
@Override
public
void
deleteByAgentId
(
String
agentId
)
throws
Exception
{
Assert
.
notNull
(
agentId
);
BizAgentApplicationPublishModel
model
=
new
BizAgentApplicationPublishModel
();
model
.
setAgentId
(
agentId
);
model
.
setIsDeleted
(
CommonConstant
.
IsDeleted
.
N
);
List
<
BizAgentApplicationPublishModel
>
models
=
this
.
repository
.
findByExample
(
model
);
if
(
CollectionUtils
.
isNotEmpty
(
models
))
{
BizAgentApplicationPublishModel
deleteModel
=
models
.
get
(
0
);
deleteModel
.
setIsDeleted
(
CommonConstant
.
IsDeleted
.
Y
);
this
.
repository
.
save
(
deleteModel
);
}
}
/**
* 参数验证和转换 Entity To Model
*
* @param entity
* @param model
*/
private
void
paramVerificationAndConvert
(
BizAgentApplicationPublishEntity
entity
,
BizAgentApplicationPublishModel
model
)
{
if
(
entity
.
getMemberId
()
!=
null
)
{
model
.
setMemberId
(
entity
.
getMemberId
());
}
if
(
StringUtils
.
isNotBlank
(
entity
.
getAgentAvatar
()))
{
model
.
setAgentAvatar
(
entity
.
getAgentAvatar
());
}
if
(
StringUtils
.
isNotBlank
(
entity
.
getAgentTitle
()))
{
model
.
setAgentTitle
(
entity
.
getAgentTitle
());
}
if
(
StringUtils
.
isNotBlank
(
entity
.
getAgentDesc
()))
{
model
.
setAgentDesc
(
entity
.
getAgentDesc
());
}
if
(
StringUtils
.
isNotBlank
(
entity
.
getAgentSystem
()))
{
model
.
setAgentSystem
(
entity
.
getAgentSystem
());
}
if
(
StringUtils
.
isNotBlank
(
entity
.
getPreamble
()))
{
model
.
setPreamble
(
entity
.
getPreamble
());
}
if
(
ArrayUtils
.
isNotEmpty
(
entity
.
getFeaturedQuestions
()))
{
model
.
setFeaturedQuestions
(
JsonUtils
.
serialize
(
entity
.
getFeaturedQuestions
()));
}
if
(
entity
.
getCommunicationTurn
()
!=
null
)
{
Assert
.
isTrue
(
entity
.
getCommunicationTurn
()
>=
0
&&
entity
.
getCommunicationTurn
()
<=
100
,
"communication turn is error,must more than 0 and less than 100"
);
model
.
setCommunicationTurn
(
entity
.
getCommunicationTurn
());
}
if
(
StringUtils
.
isNotBlank
(
entity
.
getContinuousQuestionStatus
()))
{
Assert
.
isTrue
(
AgentApplicationConstants
.
CONTINUOUS_QUESTION_STATUS
.
isQuestionStatus
(
entity
.
getContinuousQuestionStatus
())
,
"continuous question status is error , must in default , customizable and close."
);
model
.
setContinuousQuestionStatus
(
entity
.
getContinuousQuestionStatus
());
if
(
AgentApplicationConstants
.
CONTINUOUS_QUESTION_STATUS
.
CUSTOMIZABLE
.
equals
(
entity
.
getContinuousQuestionStatus
())
&&
entity
.
getContinuousQuestionTurn
()
!=
null
)
{
Assert
.
isTrue
(
entity
.
getContinuousQuestionTurn
()
>=
1
&&
entity
.
getContinuousQuestionTurn
()
<=
5
,
"continuous question turn is error,must more than 1 and less than 5"
);
model
.
setContinuousQuestionTurn
(
entity
.
getContinuousQuestionTurn
());
}
}
if
(
StringUtils
.
isNotBlank
(
entity
.
getContinuousQuestionSystem
()))
{
model
.
setContinuousQuestionSystem
(
entity
.
getContinuousQuestionSystem
());
}
if
(
ArrayUtils
.
isNotEmpty
(
entity
.
getKnowledgeIds
()))
{
model
.
setKnowledgeIds
(
JsonUtils
.
serialize
(
entity
.
getKnowledgeIds
()));
}
if
(
StringUtils
.
isNotBlank
(
entity
.
getLargeModel
()))
{
model
.
setLargeModel
(
entity
.
getLargeModel
());
}
if
(
ArrayUtils
.
isNotEmpty
(
entity
.
getUnitIds
()))
{
model
.
setUnitIds
(
JsonUtils
.
serialize
(
entity
.
getUnitIds
()));
}
}
}
\ No newline at end of file
src/main/java/cn/com/poc/expose/aggregate/AgentApplicationService.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
expose
.
aggregate
;
import
cn.com.yict.framemax.core.exception.BusinessException
;
import
javax.servlet.http.HttpServletResponse
;
public
interface
AgentApplicationService
{
/**
* 调用 已发布Agent应用
*/
void
callAgentApplication
(
String
agentId
,
String
dialogsId
,
String
input
,
HttpServletResponse
httpServletResponse
)
throws
Exception
;
}
src/main/java/cn/com/poc/expose/aggregate/impl/AgentApplicationServiceImpl.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
expose
.
aggregate
.
impl
;
import
cn.com.poc.agent_application.aggregate.AgentApplicationInfoService
;
import
cn.com.poc.agent_application.constant.AgentApplicationConstants
;
import
cn.com.poc.agent_application.constant.AgentApplicationDialoguesRecordConstants
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationDialoguesRecordEntity
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationPublishEntity
;
import
cn.com.poc.agent_application.service.BizAgentApplicationDialoguesRecordService
;
import
cn.com.poc.agent_application.service.BizAgentApplicationPublishService
;
import
cn.com.poc.common.utils.BlContext
;
import
cn.com.poc.common.utils.JsonUtils
;
import
cn.com.poc.expose.aggregate.AgentApplicationService
;
import
cn.com.poc.expose.dto.AgentApplicationDto
;
import
cn.com.poc.expose.rest.AgentApplicationRest
;
import
cn.com.poc.support.security.oauth.entity.UserBaseEntity
;
import
cn.com.poc.thirdparty.resource.demand.ai.common.domain.Message
;
import
cn.com.poc.thirdparty.resource.demand.ai.common.domain.MultiContent
;
import
cn.com.yict.framemax.core.exception.BusinessException
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.PrintWriter
;
import
java.util.ArrayList
;
import
java.util.List
;
@Service
public
class
AgentApplicationServiceImpl
implements
AgentApplicationService
{
final
private
Logger
logger
=
LoggerFactory
.
getLogger
(
AgentApplicationService
.
class
);
@Resource
private
BizAgentApplicationPublishService
bizAgentApplicationPublishService
;
@Resource
private
BizAgentApplicationDialoguesRecordService
bizAgentApplicationDialoguesRecordService
;
@Resource
private
AgentApplicationInfoService
agentApplicationInfoService
;
@Override
public
void
callAgentApplication
(
String
agentId
,
String
dialogsId
,
String
input
,
HttpServletResponse
httpServletResponse
)
throws
Exception
{
UserBaseEntity
userBaseEntity
=
BlContext
.
getCurrentUserNotException
();
if
(
userBaseEntity
==
null
)
{
throw
new
BusinessException
(
"用户未登录"
);
}
// 记录输入时间戳
Long
inputTimestamp
=
System
.
currentTimeMillis
();
BizAgentApplicationPublishEntity
infoEntity
=
bizAgentApplicationPublishService
.
getByAgentId
(
agentId
);
if
(
infoEntity
==
null
)
{
logger
.
warn
(
"can not find agent application , agent_id:{}"
,
agentId
);
throw
new
BusinessException
(
"未找到应用"
);
}
// 构造对话参数
List
<
Message
>
messages
=
new
ArrayList
<>();
buildMessages
(
dialogsId
,
agentId
,
userBaseEntity
.
getUserId
(),
messages
,
input
);
String
output
=
agentApplicationInfoService
.
callAgentApplication
(
infoEntity
.
getLargeModel
(),
infoEntity
.
getUnitIds
()
,
infoEntity
.
getAgentSystem
(),
infoEntity
.
getKnowledgeIds
(),
infoEntity
.
getCommunicationTurn
(),
infoEntity
.
getTopP
()
,
messages
,
httpServletResponse
);
//保存对话记录
// 例句回答时间戳
Long
outputTimestamp
=
System
.
currentTimeMillis
();
BizAgentApplicationDialoguesRecordEntity
inputRecord
=
new
BizAgentApplicationDialoguesRecordEntity
();
inputRecord
.
setAgentId
(
infoEntity
.
getAgentId
());
inputRecord
.
setMemberId
(
userBaseEntity
.
getUserId
());
inputRecord
.
setContent
(
input
);
inputRecord
.
setDialogsId
(
dialogsId
);
inputRecord
.
setRole
(
AgentApplicationDialoguesRecordConstants
.
ROLE
.
USER
);
inputRecord
.
setTimestamp
(
inputTimestamp
);
BizAgentApplicationDialoguesRecordEntity
outputRecord
=
new
BizAgentApplicationDialoguesRecordEntity
();
outputRecord
.
setRole
(
AgentApplicationDialoguesRecordConstants
.
ROLE
.
ASSISTANT
);
outputRecord
.
setAgentId
(
infoEntity
.
getAgentId
());
outputRecord
.
setDialogsId
(
dialogsId
);
outputRecord
.
setMemberId
(
userBaseEntity
.
getUserId
());
outputRecord
.
setContent
(
output
);
outputRecord
.
setTimestamp
(
outputTimestamp
);
bizAgentApplicationDialoguesRecordService
.
save
(
inputRecord
);
bizAgentApplicationDialoguesRecordService
.
save
(
outputRecord
);
}
private
void
buildMessages
(
String
dialogsId
,
String
agentId
,
Long
userId
,
List
<
Message
>
messages
,
String
input
)
throws
Exception
{
BizAgentApplicationDialoguesRecordEntity
recordEntity
=
new
BizAgentApplicationDialoguesRecordEntity
();
recordEntity
.
setDialogsId
(
dialogsId
);
recordEntity
.
setMemberId
(
userId
);
recordEntity
.
setAgentId
(
agentId
);
List
<
BizAgentApplicationDialoguesRecordEntity
>
recordEntities
=
bizAgentApplicationDialoguesRecordService
.
findByExample
(
recordEntity
,
null
);
if
(
CollectionUtils
.
isNotEmpty
(
recordEntities
))
{
for
(
BizAgentApplicationDialoguesRecordEntity
entity
:
recordEntities
)
{
Message
message
=
new
Message
();
MultiContent
multiContent
=
new
MultiContent
();
multiContent
.
setType
(
"text"
);
multiContent
.
setText
(
entity
.
getContent
());
message
.
setContent
(
new
ArrayList
<
MultiContent
>()
{{
add
(
multiContent
);
}});
message
.
setRole
(
entity
.
getRole
());
messages
.
add
(
message
);
}
}
Message
message
=
new
Message
();
MultiContent
multiContent
=
new
MultiContent
();
multiContent
.
setType
(
"text"
);
multiContent
.
setText
(
input
);
message
.
setContent
(
new
ArrayList
<
MultiContent
>()
{{
add
(
multiContent
);
}});
message
.
setRole
(
AgentApplicationDialoguesRecordConstants
.
ROLE
.
USER
);
messages
.
add
(
message
);
logger
.
info
(
"--------- Build Messages dialogsId:{},agentId:{},messages:{}--------------"
,
dialogsId
,
agentId
,
messages
);
}
}
src/main/java/cn/com/poc/expose/dto/AgentApplicationDto.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
expose
.
dto
;
public
class
AgentApplicationDto
{
private
String
dialogsId
;
public
String
getDialogsId
()
{
return
dialogsId
;
}
public
void
setDialogsId
(
String
dialogsId
)
{
this
.
dialogsId
=
dialogsId
;
}
private
String
agentId
;
public
String
getAgentId
()
{
return
agentId
;
}
public
void
setAgentId
(
String
agentId
)
{
this
.
agentId
=
agentId
;
}
private
String
input
;
public
String
getInput
()
{
return
input
;
}
public
void
setInput
(
String
input
)
{
this
.
input
=
input
;
}
}
src/main/java/cn/com/poc/expose/rest/AgentApplicationRest.java
View file @
0f7b3735
package
cn
.
com
.
poc
.
expose
.
rest
;
import
cn.com.poc.agent_application.dto.AgentApplicationInfoDto
;
import
cn.com.poc.agent_application.dto.AgentApplicationInfoSearchDto
;
import
cn.com.poc.agent_application.dto.BizAgentApplicationPublishDto
;
import
cn.com.poc.expose.dto.AgentApplicationDto
;
import
cn.com.yict.framemax.core.rest.BaseRest
;
import
cn.com.yict.framemax.web.permission.Access
;
import
cn.com.yict.framemax.web.permission.Permission
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
@Permission
(
value
=
Access
.
Safety
)
public
interface
AgentApplicationRest
extends
BaseRest
{
/**
* 调用 Agent应用
* 创建对话
*/
String
createDialogues
(
@RequestParam
String
agentId
)
throws
Exception
;
/**
* 调用 已发布Agent应用
*/
void
callAgentApplication
(
@Request
Param
(
"agentId"
)
String
agentId
,
@RequestBody
Object
obj
)
;
void
callAgentApplication
(
@Request
Body
AgentApplicationDto
dto
,
HttpServletResponse
httpServletResponse
)
throws
Exception
;
/**
* 获取 已发布Agent应用
*/
List
<
BizAgentApplicationPublishDto
>
getAgentApplication
(
@RequestBody
AgentApplicationInfoSearchDto
dto
,
HttpServletResponse
httpServletResponse
)
throws
Exception
;
/**
* 获取应用详情
*/
@Permission
(
value
=
Access
.
Anonymous
)
BizAgentApplicationPublishDto
getInfo
(
@RequestParam
String
agentId
)
throws
Exception
;
}
src/main/java/cn/com/poc/expose/rest/impl/AgentApplicationRestImpl.java
View file @
0f7b3735
package
cn
.
com
.
poc
.
expose
.
rest
.
impl
;
import
cn.com.poc.agent_application.convert.AgentApplicationInfoConvert
;
import
cn.com.poc.agent_application.convert.BizAgentApplicationPublishConvert
;
import
cn.com.poc.agent_application.dto.AgentApplicationInfoSearchDto
;
import
cn.com.poc.agent_application.dto.BizAgentApplicationPublishDto
;
import
cn.com.poc.agent_application.entity.BizAgentApplicationPublishEntity
;
import
cn.com.poc.agent_application.service.BizAgentApplicationPublishService
;
import
cn.com.poc.common.utils.Assert
;
import
cn.com.poc.common.utils.UUIDTool
;
import
cn.com.poc.expose.aggregate.AgentApplicationService
;
import
cn.com.poc.expose.dto.AgentApplicationDto
;
import
cn.com.poc.expose.rest.AgentApplicationRest
;
import
cn.com.yict.framemax.core.exception.BusinessException
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.util.List
;
@Component
public
class
AgentApplicationRestImpl
implements
AgentApplicationRest
{
@Override
public
void
callAgentApplication
(
String
agentId
,
Object
obj
)
{
// 获取流程
@Resource
private
AgentApplicationService
agentApplicationService
;
@Resource
private
BizAgentApplicationPublishService
bizAgentApplicationPublishService
;
// 输入获取
@Override
public
String
createDialogues
(
String
agentId
)
throws
Exception
{
return
"DIA_"
+
UUIDTool
.
getUUID
();
}
// 数据处理
@Override
public
void
callAgentApplication
(
AgentApplicationDto
dto
,
HttpServletResponse
httpServletResponse
)
throws
IOException
{
Assert
.
notNull
(
dto
,
"参数不能为空"
);
Assert
.
notBlank
(
dto
.
getInput
(),
"输入不能为空"
);
Assert
.
notNull
(
dto
.
getAgentId
(),
"应用ID不能为空"
);
Assert
.
notNull
(
dto
.
getDialogsId
(),
"对话ID不能为空"
);
try
{
agentApplicationService
.
callAgentApplication
(
dto
.
getAgentId
(),
dto
.
getDialogsId
(),
dto
.
getInput
(),
httpServletResponse
);
}
catch
(
Exception
e
)
{
httpServletResponse
.
setContentType
(
"text/event-stream"
);
PrintWriter
writer
=
httpServletResponse
.
getWriter
();
writer
.
write
(
"data: {\"code\":-1,\"message\":\""
+
e
.
getMessage
()
+
"\"} \n\n"
);
writer
.
write
(
"data: [DONE]\n\n"
);
writer
.
flush
();
}
}
// 输出返回
@Override
public
List
<
BizAgentApplicationPublishDto
>
getAgentApplication
(
AgentApplicationInfoSearchDto
dto
,
HttpServletResponse
httpServletResponse
)
throws
Exception
{
return
null
;
}
@Override
public
BizAgentApplicationPublishDto
getInfo
(
String
agentId
)
throws
Exception
{
Assert
.
notBlank
(
agentId
,
"应用ID不能为空"
);
BizAgentApplicationPublishEntity
entity
=
bizAgentApplicationPublishService
.
getByAgentId
(
agentId
);
if
(
entity
==
null
)
{
throw
new
BusinessException
(
"应用不存在"
);
}
return
BizAgentApplicationPublishConvert
.
entityToDto
(
entity
);
}
}
src/main/java/cn/com/poc/support/security/oauth/MultiDomainOauthUserManagerImplementor.java
View file @
0f7b3735
...
...
@@ -74,7 +74,7 @@ public class MultiDomainOauthUserManagerImplementor extends OauthUserManagerImpl
if
(
memberInfoModel
!=
null
)
{
MemberResponse
response
=
new
MemberResponse
();
BeanUtils
.
copyProperties
(
memberInfoModel
,
response
);
response
.
setUserAccount
(
memberInfoModel
.
getAccount
()
);
response
.
setUserAccount
(
userAccount
);
response
.
setUserName
(
memberInfoModel
.
getNickName
());
securityToken
=
new
SecurityAuthenticationToken
(
response
,
null
,
null
);
}
...
...
src/main/java/cn/com/poc/thirdparty/resource/demand/ai/common/domain/Message.java
View file @
0f7b3735
...
...
@@ -16,16 +16,6 @@ public class Message {
private
String
role
;
private
Long
timestamp
;
public
Long
getTimestamp
()
{
return
timestamp
;
}
public
void
setTimestamp
(
Long
timestamp
)
{
this
.
timestamp
=
timestamp
;
}
public
List
<
MultiContent
>
getContent
()
{
return
content
;
}
...
...
@@ -42,4 +32,11 @@ public class Message {
this
.
role
=
role
;
}
@Override
public
String
toString
()
{
return
"Message{"
+
"content="
+
content
+
", role='"
+
role
+
'\''
+
'}'
;
}
}
src/main/java/cn/com/poc/thirdparty/resource/demand/ai/common/domain/MultiContent.java
View file @
0f7b3735
package
cn
.
com
.
poc
.
thirdparty
.
resource
.
demand
.
ai
.
common
.
domain
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
MultiContent
{
private
String
type
;
...
...
@@ -34,4 +38,13 @@ public class MultiContent {
public
void
setImageUrl
(
ImageUrl
imageUrl
)
{
this
.
imageUrl
=
imageUrl
;
}
@Override
public
String
toString
()
{
return
"MultiContent{"
+
"type='"
+
type
+
'\''
+
", text='"
+
text
+
'\''
+
", imageUrl="
+
imageUrl
+
'}'
;
}
}
src/main/java/cn/com/poc/thirdparty/resource/demand/ai/constants/MultiContentEnum.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
thirdparty
.
resource
.
demand
.
ai
.
constants
;
public
enum
MultiContentEnum
{
}
src/main/java/cn/com/poc/thirdparty/resource/demand/ai/entity/ModelInfo.java
0 → 100644
View file @
0f7b3735
package
cn
.
com
.
poc
.
thirdparty
.
resource
.
demand
.
ai
.
entity
;
public
class
ModelInfo
{
private
String
modelName
;
private
String
owner
;
public
String
getModelName
()
{
return
modelName
;
}
public
void
setModelName
(
String
modelName
)
{
this
.
modelName
=
modelName
;
}
public
String
getOwner
()
{
return
owner
;
}
public
void
setOwner
(
String
owner
)
{
this
.
owner
=
owner
;
}
}
src/main/java/cn/com/poc/thirdparty/resource/demand/ai/entity/largemodel/LargeModelResponse.java
View file @
0f7b3735
...
...
@@ -24,7 +24,7 @@ public class LargeModelResponse implements Serializable {
private
Float
temperature
;
@JsonFilter
(
"top_p"
)
private
Integer
topP
;
private
Float
topP
;
private
Integer
n
;
...
...
@@ -69,11 +69,11 @@ public class LargeModelResponse implements Serializable {
this
.
temperature
=
temperature
;
}
public
Integer
getTopP
()
{
public
Float
getTopP
()
{
return
topP
;
}
public
void
setTopP
(
Integer
topP
)
{
public
void
setTopP
(
Float
topP
)
{
this
.
topP
=
topP
;
}
...
...
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