mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
(chore) update load test
This commit is contained in:
parent
ced0fb1248
commit
54c84e15e6
2 changed files with 7 additions and 8 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue