From 82c53d7e2f814719bb7de64d487aab6ea162dbae Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Tue, 12 Mar 2024 19:07:52 -0700 Subject: [PATCH] test(anthropic.py): more logging for test --- litellm/llms/anthropic.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/litellm/llms/anthropic.py b/litellm/llms/anthropic.py index 969260a134..6efe512e1d 100644 --- a/litellm/llms/anthropic.py +++ b/litellm/llms/anthropic.py @@ -262,7 +262,9 @@ def completion( completion_response["stop_reason"] ) + print_verbose(f"_is_function_call: {_is_function_call}; stream: {stream}") if _is_function_call == True and stream is not None and stream == True: + print_verbose(f"INSIDE ANTHROPIC STREAMING TOOL CALLING CONDITION BLOCK") # return an iterator streaming_model_response = ModelResponse(stream=True) streaming_model_response.choices[0].finish_reason = model_response.choices[ @@ -270,6 +272,12 @@ def completion( ].finish_reason streaming_model_response.choices[0].index = model_response.choices[0].index _tool_calls = [] + print_verbose( + f"type of model_response.choices[0]: {type(model_response.choices[0])}" + ) + print_verbose( + f"type of streaming_model_response.choices[0]: {type(streaming_model_response.choices[0])}" + ) if isinstance(model_response.choices[0], litellm.Choices) and isinstance( streaming_model_response.choices[0], litellm.utils.StreamingChoices ):