fix: "stream" hook not working

This commit is contained in:
Timothy Jaeryang Baek
2025-03-01 06:56:24 -08:00
parent 05c5e73304
commit d7088efe73
3 changed files with 14 additions and 10 deletions

View File

@@ -1021,7 +1021,7 @@ async def chat_completion(
"files": form_data.get("files", None),
"features": form_data.get("features", None),
"variables": form_data.get("variables", None),
"model": model_info.model_dump() if model_info else model,
"model": model,
"direct": model_item.get("direct", False),
**(
{"function_calling": "native"}
@@ -1039,7 +1039,7 @@ async def chat_completion(
form_data["metadata"] = metadata
form_data, metadata, events = await process_chat_payload(
request, form_data, metadata, user, model
request, form_data, user, metadata, model
)
except Exception as e:
@@ -1053,7 +1053,7 @@ async def chat_completion(
response = await chat_completion_handler(request, form_data, user)
return await process_chat_response(
request, response, form_data, user, events, metadata, tasks
request, response, form_data, user, metadata, model, events, tasks
)
except Exception as e:
raise HTTPException(