feat(router.py): add server cooldown logic

This commit is contained in:
Krrish Dholakia 2023-11-22 15:59:41 -08:00
parent 4ece219ec5
commit 3e76d4b422
5 changed files with 67 additions and 82 deletions

View file

@ -33,9 +33,6 @@ class CustomLogger:
def log_input_event(self, model, messages, kwargs, print_verbose, callback_func):
try:
print_verbose(
f"Custom Logger - Enters logging function for model {kwargs}"
)
kwargs["model"] = model
kwargs["messages"] = messages
kwargs["log_event_type"] = "pre_api_call"
@ -52,9 +49,6 @@ class CustomLogger:
def log_event(self, kwargs, response_obj, start_time, end_time, print_verbose, callback_func):
# Method definition
try:
print_verbose(
f"Custom Logger - Enters logging function for model {kwargs}"
)
kwargs["log_event_type"] = "post_api_call"
callback_func(
kwargs, # kwargs to func