updates to logging

This commit is contained in:
Krrish Dholakia 2023-08-24 18:54:34 -07:00
parent 0d24bf9221
commit 7d16df98ac
4 changed files with 49 additions and 4 deletions

View file

@ -56,6 +56,27 @@ class LiteDebugger:
f"[Non-Blocking Error] LiteDebugger: Logging Error - {traceback.format_exc()}"
)
pass
def post_call_log_event(
self, original_response, litellm_call_id, print_verbose
):
try:
litellm_data_obj = {
"status": "succeeded",
"additional_details": {"original_response": original_response},
"litellm_call_id": litellm_call_id,
"user_email": self.user_email,
}
response = requests.post(
url=self.api_url,
headers={"content-type": "application/json"},
data=json.dumps(litellm_data_obj),
)
print_verbose(f"LiteDebugger: api response - {response.text}")
except:
print_verbose(
f"[Non-Blocking Error] LiteDebugger: Logging Error - {traceback.format_exc()}"
)
def log_event(
self,