forked from phoenix/litellm-mirror
fix(anthropic.py): support streaming with function calling
This commit is contained in:
parent
10f5f342bd
commit
86ed0aaba8
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