fix(vertex_anthropic.py): Updates the vertex anthropic endpoint to do tool calling with the anthropic api params

This commit is contained in:
Krrish Dholakia 2024-07-03 15:28:31 -07:00
parent 3d61a316cb
commit 7007ace6c2
6 changed files with 139 additions and 38 deletions

View file

@ -426,13 +426,22 @@ class Logging:
self.model_call_details["additional_args"] = additional_args
self.model_call_details["log_event_type"] = "post_api_call"
verbose_logger.debug(
"RAW RESPONSE:\n{}\n\n".format(
self.model_call_details.get(
"original_response", self.model_call_details
if json_logs:
verbose_logger.debug(
"RAW RESPONSE:\n{}\n\n".format(
self.model_call_details.get(
"original_response", self.model_call_details
)
),
)
else:
print_verbose(
"RAW RESPONSE:\n{}\n\n".format(
self.model_call_details.get(
"original_response", self.model_call_details
)
)
),
)
)
if self.logger_fn and callable(self.logger_fn):
try:
self.logger_fn(