remove useless logging

This commit is contained in:
Vince Loewe 2024-03-02 11:15:21 -08:00
parent fa6211616e
commit bff53a0698
2 changed files with 0 additions and 13 deletions

View file

@ -16,7 +16,6 @@ def parse_usage(usage):
"prompt": usage["prompt_tokens"] if "prompt_tokens" in usage else 0,
}
def parse_messages(input):
if input is None:
return None
@ -68,7 +67,6 @@ class LunaryLogger:
print("Lunary not installed. Please install it using 'pip install lunary'")
raise ImportError
def log_event(
self,
kwargs,
@ -87,7 +85,6 @@ class LunaryLogger:
):
# Method definition
try:
print_verbose(f"Lunary Logging - Logging request for model {model}")
litellm_params = kwargs.get("litellm_params", {})
@ -97,9 +94,6 @@ class LunaryLogger:
tags = litellm_params.pop("tags", None) or []
if extra:
extra.pop("extra_body", None)
extra.pop("user", None)
@ -144,7 +138,6 @@ class LunaryLogger:
runtime="litellm",
tags=tags,
extra=extra,
# user_props=user_props,
)
self.lunary_client.track_event(
@ -158,7 +151,6 @@ class LunaryLogger:
token_usage=usage
)
except:
# traceback.print_exc()
print_verbose(f"Lunary Logging Error - {traceback.format_exc()}")

View file

@ -1350,14 +1350,9 @@ class Logging:
# this only logs streaming once, complete_streaming_response exists i.e when stream ends
if self.stream:
print_verbose("reaches lunary for streaming logging!")
print(kwargs)
if "complete_streaming_response" not in kwargs:
break
else:
print_verbose(
"reaches lunary for streaming logging!"
)
result = kwargs["complete_streaming_response"]
lunaryLogger.log_event(