mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-05 14:23:44 +00:00
test(anthropic.py): more logging for test
This commit is contained in:
@@ -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
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user