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, "prompt": usage["prompt_tokens"] if "prompt_tokens" in usage else 0,
} }
def parse_messages(input): def parse_messages(input):
if input is None: if input is None:
return None return None
@ -68,7 +67,6 @@ class LunaryLogger:
print("Lunary not installed. Please install it using 'pip install lunary'") print("Lunary not installed. Please install it using 'pip install lunary'")
raise ImportError raise ImportError
def log_event( def log_event(
self, self,
kwargs, kwargs,
@ -87,7 +85,6 @@ class LunaryLogger:
): ):
# Method definition # Method definition
try: try:
print_verbose(f"Lunary Logging - Logging request for model {model}") print_verbose(f"Lunary Logging - Logging request for model {model}")
litellm_params = kwargs.get("litellm_params", {}) litellm_params = kwargs.get("litellm_params", {})
@ -97,9 +94,6 @@ class LunaryLogger:
tags = litellm_params.pop("tags", None) or [] tags = litellm_params.pop("tags", None) or []
if extra: if extra:
extra.pop("extra_body", None) extra.pop("extra_body", None)
extra.pop("user", None) extra.pop("user", None)
@ -144,7 +138,6 @@ class LunaryLogger:
runtime="litellm", runtime="litellm",
tags=tags, tags=tags,
extra=extra, extra=extra,
# user_props=user_props,
) )
self.lunary_client.track_event( self.lunary_client.track_event(
@ -158,7 +151,6 @@ class LunaryLogger:
token_usage=usage token_usage=usage
) )
except: except:
# traceback.print_exc() # traceback.print_exc()
print_verbose(f"Lunary Logging Error - {traceback.format_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 # this only logs streaming once, complete_streaming_response exists i.e when stream ends
if self.stream: if self.stream:
print_verbose("reaches lunary for streaming logging!")
print(kwargs)
if "complete_streaming_response" not in kwargs: if "complete_streaming_response" not in kwargs:
break break
else: else:
print_verbose(
"reaches lunary for streaming logging!"
)
result = kwargs["complete_streaming_response"] result = kwargs["complete_streaming_response"]
lunaryLogger.log_event( lunaryLogger.log_event(