Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elleai
Project
Project
Details
Activity
Releases
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
ai-tech
E
ellehuis-group
backend
elleai
Commits
34d7fe08
Commit
34d7fe08
authored
Nov 21, 2024
by
yangyw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature: 修改热门问题关联助手
parent
1999bb9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
AppChatCompletionService.java
.../elleai/application/service/AppChatCompletionService.java
+6
-2
No files found.
src/main/java/cn/breeze/elleai/application/service/AppChatCompletionService.java
View file @
34d7fe08
...
...
@@ -421,7 +421,9 @@ public class AppChatCompletionService {
// 获取随机问题
final
List
<
HotQaMobileDto
>
hots
=
Lists
.
newArrayList
();
PageResult
<
HotQaMobileDto
>
pageResult
=
kbService
.
hotQaList
(
new
QaAssistantRequestDto
());
QaAssistantRequestDto
assistantRequestDto
=
new
QaAssistantRequestDto
();
assistantRequestDto
.
setAssistantId
(
request
.
getAssistantId
());
PageResult
<
HotQaMobileDto
>
pageResult
=
kbService
.
hotQaList
(
assistantRequestDto
);
if
(
Objects
.
nonNull
(
pageResult
)
&&
CollectionUtil
.
isNotEmpty
(
pageResult
.
getItems
()))
{
List
<
HotQaMobileDto
>
items
=
pageResult
.
getItems
();
if
(
items
.
size
()
>
2
){
...
...
@@ -430,7 +432,9 @@ public class AppChatCompletionService {
}
hots
.
addAll
(
items
);
}
List
<
HotQaResponseModel
>
hotQaList
=
chatCompletionService
.
hotQaList
(
new
HotQaRequestModel
());
HotQaRequestModel
hotQaRequestModel
=
new
HotQaRequestModel
();
hotQaRequestModel
.
setAssistantId
(
request
.
getAssistantId
());
List
<
HotQaResponseModel
>
hotQaList
=
chatCompletionService
.
hotQaList
(
hotQaRequestModel
);
if
(
CollectionUtil
.
isNotEmpty
(
hotQaList
))
{
Collections
.
shuffle
(
hotQaList
);
if
(
hotQaList
.
size
()
>
2
)
{
...
...
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