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
|
@ -9364,8 +9364,10 @@ class CustomStreamWrapper:
|
|||
def __next__(self):
|
||||
try:
|
||||
while True:
|
||||
if isinstance(self.completion_stream, str) or isinstance(
|
||||
self.completion_stream, bytes
|
||||
if (
|
||||
isinstance(self.completion_stream, str)
|
||||
or isinstance(self.completion_stream, bytes)
|
||||
or isinstance(self.completion_stream, ModelResponse)
|
||||
):
|
||||
chunk = self.completion_stream
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue