mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
updates to logging
This commit is contained in:
parent
0d24bf9221
commit
7d16df98ac
4 changed files with 49 additions and 4 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue