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
1
Merge Requests
1
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
0b9bffaf
Commit
0b9bffaf
authored
Sep 22, 2025
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 推荐问
parent
cb8fa764
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
9 deletions
+13
-9
RecommendQuestionScheduler.java
...ent_application/scheduler/RecommendQuestionScheduler.java
+3
-3
AiDialoguesService.java
...cn/com/poc/ai_dialogues/aggregate/AiDialoguesService.java
+1
-1
AiDialoguesServiceImpl.java
...c/ai_dialogues/aggregate/impl/AiDialoguesServiceImpl.java
+9
-5
No files found.
src/main/java/cn/com/poc/agent_application/scheduler/RecommendQuestionScheduler.java
View file @
0b9bffaf
...
@@ -14,12 +14,12 @@ public class RecommendQuestionScheduler {
...
@@ -14,12 +14,12 @@ public class RecommendQuestionScheduler {
private
AgentApplicationExposeService
agentApplicationExposeService
;
private
AgentApplicationExposeService
agentApplicationExposeService
;
/**
/**
* 每
日凌晨
* 每
10分钟生成
*
*
* @throws Exception
* @throws Exception
*/
*/
@Scheduled
(
cron
=
"0
0 0
* * ?"
)
@Scheduled
(
cron
=
"0
10 *
* * ?"
)
public
void
knowledgeInfoStatusUpdateScheduler
()
throws
Exception
{
public
void
knowledgeInfoStatusUpdateScheduler
()
{
agentApplicationExposeService
.
createRecommendQuestion
();
agentApplicationExposeService
.
createRecommendQuestion
();
}
}
}
}
src/main/java/cn/com/poc/ai_dialogues/aggregate/AiDialoguesService.java
View file @
0b9bffaf
...
@@ -82,7 +82,7 @@ public interface AiDialoguesService {
...
@@ -82,7 +82,7 @@ public interface AiDialoguesService {
*
*
* @param type 对话类型
* @param type 对话类型
*/
*/
List
<
String
>
guessYouAsk
(
String
type
)
throws
Exception
;
List
<
String
>
guessYouAsk
(
String
type
);
/**
/**
* 对话
* 对话
...
...
src/main/java/cn/com/poc/ai_dialogues/aggregate/impl/AiDialoguesServiceImpl.java
View file @
0b9bffaf
...
@@ -31,6 +31,7 @@ import cn.com.poc.common.utils.Assert;
...
@@ -31,6 +31,7 @@ import cn.com.poc.common.utils.Assert;
import
cn.com.poc.common.utils.JsonUtils
;
import
cn.com.poc.common.utils.JsonUtils
;
import
cn.com.poc.common.utils.SSEUtil
;
import
cn.com.poc.common.utils.SSEUtil
;
import
cn.com.poc.common.utils.StringUtils
;
import
cn.com.poc.common.utils.StringUtils
;
import
cn.com.poc.expose.aggregate.AgentApplicationExposeService
;
import
cn.com.poc.expose.dto.DialoguesContextDto
;
import
cn.com.poc.expose.dto.DialoguesContextDto
;
import
cn.com.poc.thirdparty.resource.demand.ai.constants.LLMRoleEnum
;
import
cn.com.poc.thirdparty.resource.demand.ai.constants.LLMRoleEnum
;
import
cn.com.poc.thirdparty.resource.demand.ai.entity.dialogue.Message
;
import
cn.com.poc.thirdparty.resource.demand.ai.entity.dialogue.Message
;
...
@@ -277,17 +278,20 @@ public class AiDialoguesServiceImpl implements AiDialoguesService {
...
@@ -277,17 +278,20 @@ public class AiDialoguesServiceImpl implements AiDialoguesService {
}
}
}
}
@Resource
private
AgentApplicationExposeService
agentApplicationExposeService
;
@Override
@Override
public
List
<
String
>
guessYouAsk
(
String
type
)
throws
Exception
{
public
List
<
String
>
guessYouAsk
(
String
type
)
{
//
//
String
redisKey
=
"AGENT_APPLICATION_RECOMMEND_QUESTIONS:"
+
XLangConstant
.
ZH_CN
;
String
redisKey
=
"AGENT_APPLICATION_RECOMMEND_QUESTIONS:"
+
XLangConstant
.
ZH_CN
;
long
size
=
redisService
.
lGetListSize
(
redisKey
);
if
(!
redisService
.
hasKey
(
redisKey
)
||
redisService
.
lGetListSize
(
redisKey
)
<
8
)
{
if
(
size
<
8
)
{
agentApplicationExposeService
.
createRecommendQuestion
();
redisService
.
del
(
redisKey
);
return
Collections
.
emptyList
();
}
}
long
size
=
redisService
.
lGetListSize
(
redisKey
);
List
<
Object
>
lastRecomendIdSet
=
null
;
List
<
Object
>
lastRecomendIdSet
=
null
;
Set
<
Long
>
indexSet
=
new
HashSet
<>(
8
);
Set
<
Long
>
indexSet
=
new
HashSet
<>(
8
);
SecureRandom
secureRandom
=
new
SecureRandom
();
SecureRandom
secureRandom
=
new
SecureRandom
();
...
...
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