Skip to content

Commit

Permalink
(fix) use get_logging_payload
Browse files Browse the repository at this point in the history
  • Loading branch information
ishaan-jaff committed Jan 18, 2024
1 parent 7bdf0a0 commit 4294657
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion litellm/proxy/proxy_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def generate_feedback_box():
ProxyLogging,
_cache_user_row,
send_email,
get_logging_payload,
)
from litellm.proxy.secret_managers.google_kms import load_google_kms
import pydantic
Expand Down Expand Up @@ -646,7 +647,7 @@ async def _update_key_db():
async def _insert_spend_log_to_db():
# Helper to generate payload to log
verbose_proxy_logger.debug("inserting spend log to db")
payload = litellm.utils.get_logging_payload(
payload = get_logging_payload(
kwargs=kwargs,
response_obj=completion_response,
start_time=start_time,
Expand Down
4 changes: 4 additions & 0 deletions litellm/tests/test_key_generate_dynamodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ def test_call_with_key_over_budget(custom_db_client):
# 5. Make a call with a key over budget, expect to fail
setattr(litellm.proxy.proxy_server, "custom_db_client", custom_db_client)
setattr(litellm.proxy.proxy_server, "master_key", "sk-1234")
from litellm._logging import verbose_proxy_logger
import logging

verbose_proxy_logger.setLevel(logging.DEBUG)
try:

async def test():
Expand Down

0 comments on commit 4294657

Please sign in to comment.