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
ed205d82
"...git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "7bfe413914bd75f1284109155550c3dbc79c7cef"
Commit
ed205d82
authored
Aug 06, 2024
by
Michael Poluektov
Browse files
fix: pop
parent
fc31267a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
backend/apps/ollama/main.py
backend/apps/ollama/main.py
+2
-2
backend/apps/openai/main.py
backend/apps/openai/main.py
+1
-1
No files found.
backend/apps/ollama/main.py
View file @
ed205d82
...
...
@@ -729,7 +729,7 @@ async def generate_chat_completion(
payload
=
{
**
form_data
.
model_dump
(
exclude_none
=
True
,
exclude
=
[
"metadata"
]),
}
payload
.
pop
(
"metadata"
)
payload
.
pop
(
"metadata"
,
None
)
model_id
=
form_data
.
model
model_info
=
Models
.
get_model_by_id
(
model_id
)
...
...
@@ -788,7 +788,7 @@ async def generate_openai_chat_completion(
):
completion_form
=
OpenAIChatCompletionForm
(
**
form_data
)
payload
=
{
**
completion_form
.
model_dump
(
exclude_none
=
True
,
exclude
=
[
"metadata"
])}
payload
.
pop
(
"metadata"
)
payload
.
pop
(
"metadata"
,
None
)
model_id
=
completion_form
.
model
model_info
=
Models
.
get_model_by_id
(
model_id
)
...
...
backend/apps/openai/main.py
View file @
ed205d82
...
...
@@ -359,7 +359,7 @@ async def generate_chat_completion(
):
idx
=
0
payload
=
{
**
form_data
}
payload
.
pop
(
"metadata"
)
payload
.
pop
(
"metadata"
,
None
)
model_id
=
form_data
.
get
(
"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