Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
44884a88
Commit
44884a88
authored
Apr 30, 2024
by
Timothy J. Baek
Browse files
feat: randomised suggestion
parent
a01fd158
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
src/lib/components/chat/MessageInput/Suggestions.svelte
src/lib/components/chat/MessageInput/Suggestions.svelte
+3
-1
No files found.
src/lib/components/chat/MessageInput/Suggestions.svelte
View file @
44884a88
...
@@ -4,7 +4,9 @@
...
@@ -4,7 +4,9 @@
let prompts = [];
let prompts = [];
$: prompts = suggestionPrompts;
$: prompts = suggestionPrompts
.reduce((acc, current) => [...acc, ...[current]], [])
.sort(() => Math.random() - 0.5);
// suggestionPrompts.length <= 4
// suggestionPrompts.length <= 4
// ? suggestionPrompts
// ? suggestionPrompts
// : suggestionPrompts.sort(() => Math.random() - 0.5).slice(0, 4);
// : suggestionPrompts.sort(() => Math.random() - 0.5).slice(0, 4);
...
...
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