From 84c7a5b693f8ab566cfbbe36e91e2c31c27e1fb9 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Tue, 12 Mar 2024 10:23:56 -0700 Subject: [PATCH] fix(anthropic.py): fix linting errors --- litellm/llms/anthropic.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/litellm/llms/anthropic.py b/litellm/llms/anthropic.py index 6aafb433f05..e74b2d0e570 100644 --- a/litellm/llms/anthropic.py +++ b/litellm/llms/anthropic.py @@ -269,7 +269,9 @@ def completion( ].finish_reason streaming_model_response.choices[0].index = model_response.choices[0].index _tool_calls = [] - if isinstance(model_response.choices[0], litellm.Choices): + if isinstance(model_response.choices[0], litellm.Choices) and isinstance( + streaming_model_response.choices[0], litellm.utils.StreamingChoices + ): if getattr( model_response.choices[0].message, "tool_calls", None ) is not None and isinstance(