fix(main.py): fix order of assembly for streaming chunks

This commit is contained in:
Krrish Dholakia 2024-01-25 14:51:08 -08:00
parent 09ec6d6458
commit bbe6a92eb9
3 changed files with 8 additions and 1 deletions

View file

@ -7714,6 +7714,7 @@ class CustomStreamWrapper:
else:
self.response_id = model_response.id
model_response._hidden_params["custom_llm_provider"] = self.custom_llm_provider
model_response._hidden_params["created_at"] = time.time()
model_response.choices = [StreamingChoices()]
model_response.choices[0].finish_reason = None
response_obj = {}