From e6b5152e639281eaa4b2ed9b146bb7e6a5f7ffe9 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Fri, 19 Jan 2024 08:52:17 -0800 Subject: [PATCH] (chore) update load test --- litellm/proxy/proxy_config.yaml | 5 +++-- litellm/proxy/tests/load_test_completion.py | 10 ++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/litellm/proxy/proxy_config.yaml b/litellm/proxy/proxy_config.yaml index 8cd2fcec85f..417b4c6f10d 100644 --- a/litellm/proxy/proxy_config.yaml +++ b/litellm/proxy/proxy_config.yaml @@ -57,12 +57,13 @@ model_list: mode: embedding litellm_settings: fallbacks: [{"openai-gpt-3.5": ["azure-gpt-3.5"]}] + success_callback: ['langfuse'] # cache: True # setting callback class # callbacks: custom_callbacks.proxy_handler_instance # sets litellm.callbacks = [proxy_handler_instance] -general_settings: - master_key: sk-1234 +# general_settings: +# master_key: sk-1234 # database_type: "dynamo_db" # database_args: { # 👈 all args - https://github.com/BerriAI/litellm/blob/befbcbb7ac8f59835ce47415c128decf37aac328/litellm/proxy/_types.py#L190 # "billing_mode": "PAY_PER_REQUEST", diff --git a/litellm/proxy/tests/load_test_completion.py b/litellm/proxy/tests/load_test_completion.py index f2f480c8891..b5d711d8131 100644 --- a/litellm/proxy/tests/load_test_completion.py +++ b/litellm/proxy/tests/load_test_completion.py @@ -11,12 +11,10 @@ async def litellm_completion(): # Your existing code for litellm_completion goes here try: response = await litellm_client.chat.completions.create( - model="Azure OpenAI GPT-4 Canada-East (External)", - stream=True, + model="azure-gpt-3.5", messages=[{"role": "user", "content": f"This is a test: {uuid.uuid4()}"}], ) - async for chunk in response: - print(chunk) + print(response) return response except Exception as e: @@ -27,9 +25,9 @@ async def litellm_completion(): async def main(): - for i in range(1000000): + for i in range(150): start = time.time() - n = 1000 # Number of concurrent tasks + n = 150 # Number of concurrent tasks tasks = [litellm_completion() for _ in range(n)] chat_completions = await asyncio.gather(*tasks)