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
309cd645
Commit
309cd645
authored
Aug 08, 2024
by
Michael Poluektov
Browse files
undo del
parent
a725801e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
backend/apps/ollama/main.py
backend/apps/ollama/main.py
+4
-2
No files found.
backend/apps/ollama/main.py
View file @
309cd645
...
...
@@ -726,7 +726,8 @@ async def generate_chat_completion(
payload
=
{
**
form_data
.
model_dump
(
exclude_none
=
True
,
exclude
=
[
"metadata"
]),
}
payload
.
pop
(
"metadata"
,
None
)
if
"metadata"
in
payload
:
del
payload
[
"metadata"
]
model_id
=
form_data
.
model
model_info
=
Models
.
get_model_by_id
(
model_id
)
...
...
@@ -785,7 +786,8 @@ async def generate_openai_chat_completion(
):
completion_form
=
OpenAIChatCompletionForm
(
**
form_data
)
payload
=
{
**
completion_form
.
model_dump
(
exclude_none
=
True
,
exclude
=
[
"metadata"
])}
payload
.
pop
(
"metadata"
,
None
)
if
"metadata"
in
payload
:
del
payload
[
"metadata"
]
model_id
=
completion_form
.
model
model_info
=
Models
.
get_model_by_id
(
model_id
)
...
...
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