mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
fix(anthropic.py): support streaming with function calling
This commit is contained in:
parent
5e69cc6ba1
commit
1c6438c267
4 changed files with 109 additions and 7 deletions
|
@ -1073,7 +1073,11 @@ def completion(
|
|||
logging_obj=logging,
|
||||
headers=headers,
|
||||
)
|
||||
if "stream" in optional_params and optional_params["stream"] == True:
|
||||
if (
|
||||
"stream" in optional_params
|
||||
and optional_params["stream"] == True
|
||||
and not isinstance(response, CustomStreamWrapper)
|
||||
):
|
||||
# don't try to access stream object,
|
||||
response = CustomStreamWrapper(
|
||||
response,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue