(test) load test

This commit is contained in:
ishaan-jaff 2023-11-27 18:08:28 -08:00
parent 50733363ee
commit 40d9e8ab23

View file

@ -13,10 +13,13 @@ litellm_client = AsyncOpenAI(
async def litellm_completion():
# Your existing code for litellm_completion goes here
try:
return await litellm_client.chat.completions.create(
response = await litellm_client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[{"role": "user", "content": f"This is a test: {uuid.uuid4()}"}],
)
print(response)
return response
except Exception as e:
# If there's an exception, log the error message
with open("error_log.txt", "a") as error_log: