mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
fix(azure.py): return response headers acompletion + acompletion w/ streaming
Fixes https://github.com/BerriAI/litellm/issues/2440#issuecomment-2283259187
This commit is contained in:
parent
b3c7d63ec1
commit
96d4466a8f
1 changed files with 3 additions and 0 deletions
|
|
@ -745,6 +745,8 @@ class AzureChatCompletion(BaseLLM):
|
|||
return convert_to_model_response_object(
|
||||
response_object=stringified_response,
|
||||
model_response_object=model_response,
|
||||
hidden_params={"headers": headers},
|
||||
_response_headers=headers,
|
||||
)
|
||||
except AzureOpenAIError as e:
|
||||
## LOGGING
|
||||
|
|
@ -905,6 +907,7 @@ class AzureChatCompletion(BaseLLM):
|
|||
model=model,
|
||||
custom_llm_provider="azure",
|
||||
logging_obj=logging_obj,
|
||||
_response_headers=headers,
|
||||
)
|
||||
return streamwrapper ## DO NOT make this into an async for ... loop, it will yield an async generator, which won't raise errors if the response fails
|
||||
except Exception as e:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue