From cd671f321190262b4857f6c9ba3f7e362042346d Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Mon, 11 Dec 2023 15:27:08 -0800 Subject: [PATCH] (test) proxy custom logger --- litellm/tests/test_aamazing_proxy_custom_logger.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/litellm/tests/test_aamazing_proxy_custom_logger.py b/litellm/tests/test_aamazing_proxy_custom_logger.py index 9325d5f88c4..e53ae3fc311 100644 --- a/litellm/tests/test_aamazing_proxy_custom_logger.py +++ b/litellm/tests/test_aamazing_proxy_custom_logger.py @@ -3,7 +3,7 @@ import traceback from dotenv import load_dotenv load_dotenv() -import os, io +import os, io, asyncio # this file is to test litellm/proxy @@ -122,7 +122,7 @@ def test_chat_completion(client): "messages": [ { "role": "user", - "content": "hi" + "content": "write a litellm poem" }, ], "max_tokens": 10, @@ -132,6 +132,8 @@ def test_chat_completion(client): response = client.post("/chat/completions", json=test_data, headers=headers) print("made request", response.status_code, response.text) print("LiteLLM Callbacks", litellm.callbacks) + asyncio.sleep(1) # sleep while waiting for callback to run + print("my_custom_logger in /chat/completions", my_custom_logger) print("vars my custom logger, ", vars(my_custom_logger)) assert my_custom_logger.async_success == True # checks if the status of async_success is True, only the async_log_success_event can set this to true