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
9091513c
Commit
9091513c
authored
Apr 14, 2024
by
Timothy J. Baek
Browse files
fix
parent
0f5ecafc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
backend/apps/ollama/main.py
backend/apps/ollama/main.py
+4
-4
No files found.
backend/apps/ollama/main.py
View file @
9091513c
...
...
@@ -618,7 +618,7 @@ async def generate_embeddings(
model
=
f
"
{
model
}
:latest"
if
model
in
app
.
state
.
MODELS
:
url_idx
=
random
.
choice
(
app
.
state
.
MODELS
[
form_data
.
model
][
"urls"
])
url_idx
=
random
.
choice
(
app
.
state
.
MODELS
[
model
][
"urls"
])
else
:
raise
HTTPException
(
status_code
=
400
,
...
...
@@ -683,7 +683,7 @@ async def generate_completion(
model
=
f
"
{
model
}
:latest"
if
model
in
app
.
state
.
MODELS
:
url_idx
=
random
.
choice
(
app
.
state
.
MODELS
[
form_data
.
model
][
"urls"
])
url_idx
=
random
.
choice
(
app
.
state
.
MODELS
[
model
][
"urls"
])
else
:
raise
HTTPException
(
status_code
=
400
,
...
...
@@ -786,7 +786,7 @@ async def generate_chat_completion(
model
=
f
"
{
model
}
:latest"
if
model
in
app
.
state
.
MODELS
:
url_idx
=
random
.
choice
(
app
.
state
.
MODELS
[
form_data
.
model
][
"urls"
])
url_idx
=
random
.
choice
(
app
.
state
.
MODELS
[
model
][
"urls"
])
else
:
raise
HTTPException
(
status_code
=
400
,
...
...
@@ -895,7 +895,7 @@ async def generate_openai_chat_completion(
model
=
f
"
{
model
}
:latest"
if
model
in
app
.
state
.
MODELS
:
url_idx
=
random
.
choice
(
app
.
state
.
MODELS
[
form_data
.
model
][
"urls"
])
url_idx
=
random
.
choice
(
app
.
state
.
MODELS
[
model
][
"urls"
])
else
:
raise
HTTPException
(
status_code
=
400
,
...
...
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