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
f96beeee
Commit
f96beeee
authored
Mar 29, 2024
by
Timothy J. Baek
Browse files
fix: litellm issue
parent
0c367412
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
src/routes/(app)/+page.svelte
src/routes/(app)/+page.svelte
+5
-1
src/routes/(app)/c/[id]/+page.svelte
src/routes/(app)/c/[id]/+page.svelte
+3
-1
No files found.
src/routes/(app)/+page.svelte
View file @
f96beeee
...
@@ -534,6 +534,8 @@
...
@@ -534,6 +534,8 @@
console
.
log
(
docs
);
console
.
log
(
docs
);
console
.
log
(
model
);
const
res
=
await
generateOpenAIChatCompletion
(
const
res
=
await
generateOpenAIChatCompletion
(
localStorage
.
token
,
localStorage
.
token
,
{
{
...
@@ -586,7 +588,9 @@
...
@@ -586,7 +588,9 @@
max_tokens
:
$
settings
?.
options
?.
num_predict
??
undefined
,
max_tokens
:
$
settings
?.
options
?.
num_predict
??
undefined
,
docs
:
docs
.
length
>
0
?
docs
:
undefined
docs
:
docs
.
length
>
0
?
docs
:
undefined
},
},
model
.
source
===
'litellm'
?
`${
LITELLM_API_BASE_URL
}/
v1
`
:
`${
OPENAI_API_BASE_URL
}`
model
.
source
.
toLowerCase
()
===
'litellm'
?
`${
LITELLM_API_BASE_URL
}/
v1
`
:
`${
OPENAI_API_BASE_URL
}`
);
);
if
(
res
&&
res
.
ok
)
{
if
(
res
&&
res
.
ok
)
{
...
...
src/routes/(app)/c/[id]/+page.svelte
View file @
f96beeee
...
@@ -602,7 +602,9 @@
...
@@ -602,7 +602,9 @@
max_tokens
:
$
settings
?.
options
?.
num_predict
??
undefined
,
max_tokens
:
$
settings
?.
options
?.
num_predict
??
undefined
,
docs
:
docs
.
length
>
0
?
docs
:
undefined
docs
:
docs
.
length
>
0
?
docs
:
undefined
},
},
model
.
source
===
'litellm'
?
`${
LITELLM_API_BASE_URL
}/
v1
`
:
`${
OPENAI_API_BASE_URL
}`
model
.
source
.
toLowerCase
()
===
'litellm'
?
`${
LITELLM_API_BASE_URL
}/
v1
`
:
`${
OPENAI_API_BASE_URL
}`
);
);
if
(
res
&&
res
.
ok
)
{
if
(
res
&&
res
.
ok
)
{
...
...
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