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
e0628f0e
Commit
e0628f0e
authored
Nov 27, 2024
by
陈立彬
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/feature/20240918_chain' into feature/20240918_chain
parents
d2f47dc8
34d7fe08
Changes
1
Show 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 @
e0628f0e
...
@@ -421,7 +421,9 @@ public class AppChatCompletionService {
...
@@ -421,7 +421,9 @@ public class AppChatCompletionService {
// 获取随机问题
// 获取随机问题
final
List
<
HotQaMobileDto
>
hots
=
Lists
.
newArrayList
();
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
()))
{
if
(
Objects
.
nonNull
(
pageResult
)
&&
CollectionUtil
.
isNotEmpty
(
pageResult
.
getItems
()))
{
List
<
HotQaMobileDto
>
items
=
pageResult
.
getItems
();
List
<
HotQaMobileDto
>
items
=
pageResult
.
getItems
();
if
(
items
.
size
()
>
2
){
if
(
items
.
size
()
>
2
){
...
@@ -430,7 +432,9 @@ public class AppChatCompletionService {
...
@@ -430,7 +432,9 @@ public class AppChatCompletionService {
}
}
hots
.
addAll
(
items
);
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
))
{
if
(
CollectionUtil
.
isNotEmpty
(
hotQaList
))
{
Collections
.
shuffle
(
hotQaList
);
Collections
.
shuffle
(
hotQaList
);
if
(
hotQaList
.
size
()
>
2
)
{
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