mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 04:45:19 +00:00
feat: randomised suggestion
This commit is contained in:
parent
a01fd15812
commit
44884a8886
1 changed files with 3 additions and 1 deletions
|
|
@ -4,7 +4,9 @@
|
|||
|
||||
let prompts = [];
|
||||
|
||||
$: prompts = suggestionPrompts;
|
||||
$: prompts = suggestionPrompts
|
||||
.reduce((acc, current) => [...acc, ...[current]], [])
|
||||
.sort(() => Math.random() - 0.5);
|
||||
// suggestionPrompts.length <= 4
|
||||
// ? suggestionPrompts
|
||||
// : suggestionPrompts.sort(() => Math.random() - 0.5).slice(0, 4);
|
||||
|
|
|
|||
Loading…
Reference in a new issue