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
f087ee58
Commit
f087ee58
authored
Nov 05, 2024
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: agent应用,知识库ID修正为int
parent
cd3386a0
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
16 deletions
+16
-16
AgentApplicationInfoConvert.java
...gent_application/convert/AgentApplicationInfoConvert.java
+2
-2
BizAgentApplicationPublishConvert.java
...pplication/convert/BizAgentApplicationPublishConvert.java
+1
-1
AgentApplicationKnowledgeConfig.java
...t_application/domain/AgentApplicationKnowledgeConfig.java
+3
-3
BizAgentApplicationInfoEntity.java
...ent_application/entity/BizAgentApplicationInfoEntity.java
+3
-3
BizAgentApplicationPublishEntity.java
..._application/entity/BizAgentApplicationPublishEntity.java
+3
-3
KnowledgeService.java
...java/cn/com/poc/knowledge/aggregate/KnowledgeService.java
+1
-1
KnowledgeServiceImpl.java
...om/poc/knowledge/aggregate/impl/KnowledgeServiceImpl.java
+3
-3
No files found.
src/main/java/cn/com/poc/agent_application/convert/AgentApplicationInfoConvert.java
View file @
f087ee58
...
@@ -63,7 +63,7 @@ public class AgentApplicationInfoConvert {
...
@@ -63,7 +63,7 @@ public class AgentApplicationInfoConvert {
entity
.
setContinuousQuestionSystem
(
model
.
getContinuousQuestionSystem
());
entity
.
setContinuousQuestionSystem
(
model
.
getContinuousQuestionSystem
());
entity
.
setContinuousQuestionTurn
(
model
.
getContinuousQuestionTurn
());
entity
.
setContinuousQuestionTurn
(
model
.
getContinuousQuestionTurn
());
if
(
StringUtils
.
isNotBlank
(
model
.
getKnowledgeIds
()))
{
if
(
StringUtils
.
isNotBlank
(
model
.
getKnowledgeIds
()))
{
entity
.
setKnowledgeIds
(
JsonUtils
.
deSerialize
(
model
.
getKnowledgeIds
(),
String
[].
class
));
entity
.
setKnowledgeIds
(
JsonUtils
.
deSerialize
(
model
.
getKnowledgeIds
(),
Integer
[].
class
));
}
}
entity
.
setLargeModel
(
model
.
getLargeModel
());
entity
.
setLargeModel
(
model
.
getLargeModel
());
entity
.
setTopP
(
model
.
getTopP
());
entity
.
setTopP
(
model
.
getTopP
());
...
@@ -235,7 +235,7 @@ public class AgentApplicationInfoConvert {
...
@@ -235,7 +235,7 @@ public class AgentApplicationInfoConvert {
entity
.
setContinuousQuestionSystem
(
infoQueryItem
.
getContinuousQuestionSystem
());
entity
.
setContinuousQuestionSystem
(
infoQueryItem
.
getContinuousQuestionSystem
());
entity
.
setContinuousQuestionTurn
(
infoQueryItem
.
getContinuousQuestionTurn
());
entity
.
setContinuousQuestionTurn
(
infoQueryItem
.
getContinuousQuestionTurn
());
if
(
StringUtils
.
isNotBlank
(
infoQueryItem
.
getKnowledgeIds
()))
{
if
(
StringUtils
.
isNotBlank
(
infoQueryItem
.
getKnowledgeIds
()))
{
entity
.
setKnowledgeIds
(
JsonUtils
.
deSerialize
(
infoQueryItem
.
getKnowledgeIds
(),
String
[].
class
));
entity
.
setKnowledgeIds
(
JsonUtils
.
deSerialize
(
infoQueryItem
.
getKnowledgeIds
(),
Integer
[].
class
));
}
}
entity
.
setLargeModel
(
infoQueryItem
.
getLargeModel
());
entity
.
setLargeModel
(
infoQueryItem
.
getLargeModel
());
entity
.
setTopP
(
infoQueryItem
.
getTopP
());
entity
.
setTopP
(
infoQueryItem
.
getTopP
());
...
...
src/main/java/cn/com/poc/agent_application/convert/BizAgentApplicationPublishConvert.java
View file @
f087ee58
...
@@ -48,7 +48,7 @@ public class BizAgentApplicationPublishConvert {
...
@@ -48,7 +48,7 @@ public class BizAgentApplicationPublishConvert {
entity
.
setContinuousQuestionSystem
(
model
.
getContinuousQuestionSystem
());
entity
.
setContinuousQuestionSystem
(
model
.
getContinuousQuestionSystem
());
entity
.
setContinuousQuestionTurn
(
model
.
getContinuousQuestionTurn
());
entity
.
setContinuousQuestionTurn
(
model
.
getContinuousQuestionTurn
());
if
(
StringUtils
.
isNotBlank
(
model
.
getKnowledgeIds
()))
{
if
(
StringUtils
.
isNotBlank
(
model
.
getKnowledgeIds
()))
{
entity
.
setKnowledgeIds
(
JsonUtils
.
deSerialize
(
model
.
getKnowledgeIds
(),
String
[].
class
));
entity
.
setKnowledgeIds
(
JsonUtils
.
deSerialize
(
model
.
getKnowledgeIds
(),
Integer
[].
class
));
}
}
entity
.
setLargeModel
(
model
.
getLargeModel
());
entity
.
setLargeModel
(
model
.
getLargeModel
());
entity
.
setTopP
(
model
.
getTopP
());
entity
.
setTopP
(
model
.
getTopP
());
...
...
src/main/java/cn/com/poc/agent_application/domain/AgentApplicationKnowledgeConfig.java
View file @
f087ee58
...
@@ -9,13 +9,13 @@ public class AgentApplicationKnowledgeConfig {
...
@@ -9,13 +9,13 @@ public class AgentApplicationKnowledgeConfig {
* knowledge_ids
* knowledge_ids
* 知识库ID
* 知识库ID
*/
*/
private
java
.
lang
.
String
[]
knowledgeIds
;
private
java
.
lang
.
Integer
[]
knowledgeIds
;
public
java
.
lang
.
String
[]
getKnowledgeIds
()
{
public
java
.
lang
.
Integer
[]
getKnowledgeIds
()
{
return
this
.
knowledgeIds
;
return
this
.
knowledgeIds
;
}
}
public
void
setKnowledgeIds
(
java
.
lang
.
String
[]
knowledgeIds
)
{
public
void
setKnowledgeIds
(
java
.
lang
.
Integer
[]
knowledgeIds
)
{
this
.
knowledgeIds
=
knowledgeIds
;
this
.
knowledgeIds
=
knowledgeIds
;
}
}
}
}
src/main/java/cn/com/poc/agent_application/entity/BizAgentApplicationInfoEntity.java
View file @
f087ee58
...
@@ -221,13 +221,13 @@ public class BizAgentApplicationInfoEntity {
...
@@ -221,13 +221,13 @@ public class BizAgentApplicationInfoEntity {
* knowledge_ids
* knowledge_ids
* 知识库ID
* 知识库ID
*/
*/
private
java
.
lang
.
String
[]
knowledgeIds
;
private
java
.
lang
.
Integer
[]
knowledgeIds
;
public
java
.
lang
.
String
[]
getKnowledgeIds
()
{
public
java
.
lang
.
Integer
[]
getKnowledgeIds
()
{
return
this
.
knowledgeIds
;
return
this
.
knowledgeIds
;
}
}
public
void
setKnowledgeIds
(
java
.
lang
.
String
[]
knowledgeIds
)
{
public
void
setKnowledgeIds
(
java
.
lang
.
Integer
[]
knowledgeIds
)
{
this
.
knowledgeIds
=
knowledgeIds
;
this
.
knowledgeIds
=
knowledgeIds
;
}
}
...
...
src/main/java/cn/com/poc/agent_application/entity/BizAgentApplicationPublishEntity.java
View file @
f087ee58
...
@@ -203,13 +203,13 @@ public class BizAgentApplicationPublishEntity {
...
@@ -203,13 +203,13 @@ public class BizAgentApplicationPublishEntity {
/** knowledge_ids
/** knowledge_ids
*知识库ID
*知识库ID
*/
*/
private
java
.
lang
.
String
[]
knowledgeIds
;
private
java
.
lang
.
Integer
[]
knowledgeIds
;
public
java
.
lang
.
String
[]
getKnowledgeIds
(){
public
java
.
lang
.
Integer
[]
getKnowledgeIds
(){
return
this
.
knowledgeIds
;
return
this
.
knowledgeIds
;
}
}
public
void
setKnowledgeIds
(
java
.
lang
.
String
[]
knowledgeIds
){
public
void
setKnowledgeIds
(
java
.
lang
.
Integer
[]
knowledgeIds
){
this
.
knowledgeIds
=
knowledgeIds
;
this
.
knowledgeIds
=
knowledgeIds
;
}
}
/** large_model
/** large_model
...
...
src/main/java/cn/com/poc/knowledge/aggregate/KnowledgeService.java
View file @
f087ee58
...
@@ -103,6 +103,6 @@ public interface KnowledgeService {
...
@@ -103,6 +103,6 @@ public interface KnowledgeService {
*
*
* @param knowledgeInfoIds 知识库信息ID列表
* @param knowledgeInfoIds 知识库信息ID列表
*/
*/
List
<
Integer
>
getKdIdsByKnowledgeInfoIds
(
String
[]
knowledgeInfoIds
)
throws
Exception
;
List
<
Integer
>
getKdIdsByKnowledgeInfoIds
(
Integer
[]
knowledgeInfoIds
)
throws
Exception
;
}
}
src/main/java/cn/com/poc/knowledge/aggregate/impl/KnowledgeServiceImpl.java
View file @
f087ee58
...
@@ -293,12 +293,12 @@ public class KnowledgeServiceImpl implements KnowledgeService {
...
@@ -293,12 +293,12 @@ public class KnowledgeServiceImpl implements KnowledgeService {
}
}
@Override
@Override
public
List
<
Integer
>
getKdIdsByKnowledgeInfoIds
(
String
[]
knowledgeInfoIds
)
throws
Exception
{
public
List
<
Integer
>
getKdIdsByKnowledgeInfoIds
(
Integer
[]
knowledgeInfoIds
)
throws
Exception
{
//获取知识库配置
//获取知识库配置
List
<
Integer
>
kdIdList
=
new
ArrayList
<>();
List
<
Integer
>
kdIdList
=
new
ArrayList
<>();
if
(
ArrayUtils
.
isNotEmpty
(
knowledgeInfoIds
))
{
if
(
ArrayUtils
.
isNotEmpty
(
knowledgeInfoIds
))
{
for
(
String
knowledgeId
:
knowledgeInfoIds
)
{
for
(
Integer
knowledgeId
:
knowledgeInfoIds
)
{
BizKnowledgeInfoEntity
bizKnowledgeInfoEntity
=
bizKnowledgeInfoService
.
get
(
Integer
.
valueOf
(
knowledgeId
)
);
BizKnowledgeInfoEntity
bizKnowledgeInfoEntity
=
bizKnowledgeInfoService
.
get
(
knowledgeId
);
if
(
bizKnowledgeInfoEntity
==
null
||
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isBlank
(
bizKnowledgeInfoEntity
.
getKdIds
()))
{
if
(
bizKnowledgeInfoEntity
==
null
||
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isBlank
(
bizKnowledgeInfoEntity
.
getKdIds
()))
{
continue
;
continue
;
}
}
...
...
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