mirror of
https://github.com/open-webui/open-webui.git
synced 2026-01-03 23:25:21 +00:00
undo del
This commit is contained in:
parent
a725801e55
commit
309cd645f1
1 changed files with 4 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue