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
e71ef421
Commit
e71ef421
authored
Apr 27, 2024
by
Timothy J. Baek
Browse files
fix: stop seq backslash issue
parent
7f3daa19
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
src/routes/(app)/+page.svelte
src/routes/(app)/+page.svelte
+0
-3
src/routes/(app)/c/[id]/+page.svelte
src/routes/(app)/c/[id]/+page.svelte
+13
-2
No files found.
src/routes/(app)/+page.svelte
View file @
e71ef421
...
...
@@ -347,9 +347,6 @@
)
.
flat
(
1
);
console
.
log
($
settings
.
options
.
stop
);
//
console
.
log
($
settings
.
options
.
stop
.
map
((
str
)
=>
str
));
const
[
res
,
controller
]
=
await
generateChatCompletion
(
localStorage
.
token
,
{
model
:
model
,
messages
:
messagesBody
,
...
...
src/routes/(app)/c/[id]/+page.svelte
View file @
e71ef421
...
...
@@ -365,7 +365,13 @@
model
:
model
,
messages
:
messagesBody
,
options
:
{
...($
settings
.
options
??
{})
...($
settings
.
options
??
{}),
stop
:
$
settings
?.
options
?.
stop
??
undefined
?
$
settings
.
options
.
stop
.
map
((
str
)
=>
decodeURIComponent
(
JSON
.
parse
(
'"'
+
str
.
replace
(/\
"/g, '
\\
"
') + '
"'))
)
: undefined
},
format: $settings.requestFormat ?? undefined,
keep_alive: $settings.keepAlive ?? undefined,
...
...
@@ -588,7 +594,12 @@
})
})),
seed: $settings?.options?.seed ?? undefined,
stop
:
$
settings
?.
options
?.
stop
??
undefined
,
stop:
$settings?.options?.stop ?? undefined
? $settings.options.stop.map((str) =>
decodeURIComponent(JSON.parse('"
' + str.replace(/\"/g, '
\\
"') + '"
'))
)
: undefined,
temperature: $settings?.options?.temperature ?? undefined,
top_p: $settings?.options?.top_p ?? undefined,
num_ctx: $settings?.options?.num_ctx ?? undefined,
...
...
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