fix(utils.py): bug fixes

This commit is contained in:
Krrish Dholakia 2024-01-11 18:14:22 +05:30
parent 252c8415c6
commit bfa26dd5b3
2 changed files with 88 additions and 9 deletions

View file

@ -545,8 +545,9 @@ async def test_async_chat_bedrock_stream():
# asyncio.run(test_async_chat_bedrock_stream())
# Text Completion
# Text Completion
## Test OpenAI text completion + Async
@pytest.mark.asyncio
async def test_async_text_completion_openai_stream():
@ -585,6 +586,7 @@ async def test_async_text_completion_openai_stream():
except Exception as e:
pytest.fail(f"An exception occurred: {str(e)}")
# EMBEDDING
## Test OpenAI + Async
@pytest.mark.asyncio
@ -758,6 +760,7 @@ async def test_async_embedding_azure_caching():
)
await asyncio.sleep(1) # success callbacks are done in parallel
print(customHandler_caching.states)
print(customHandler_caching.errors)
assert len(customHandler_caching.errors) == 0
assert len(customHandler_caching.states) == 4 # pre, post, success, success