This commit is contained in:
Michael Poluektov 2024-08-06 12:25:00 +01:00
parent fc31267a54
commit ed205d82e8
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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)