mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-05 08:07:05 +00:00
test(anthropic.py): more logging for test
This commit is contained in:
parent
e342ecd873
commit
82c53d7e2f
1 changed files with 8 additions and 0 deletions
|
|
@ -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
|
||||
):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue