test - delete assistants

This commit is contained in:
Ishaan Jaff 2024-07-10 10:35:30 -07:00
parent 5bf430f201
commit 3480382495

View file

@ -62,10 +62,10 @@ async def test_get_assistants(provider, sync_mode):
@pytest.mark.parametrize("provider", ["openai"])
@pytest.mark.parametrize(
"sync_mode",
[False],
[True, False],
)
@pytest.mark.asyncio
async def test_create_assistants(provider, sync_mode):
async def test_create_delete_assistants(provider, sync_mode):
data = {
"custom_llm_provider": provider,
}
@ -85,6 +85,12 @@ async def test_create_assistants(provider, sync_mode):
== "You are a personal math tutor. When asked a question, write and run Python code to answer the question."
)
assert assistant.id is not None
# delete the created assistant
response = litellm.delete_assistant(
custom_llm_provider="openai", assistant_id=assistant.id
)
print("Response deleting assistant", response)
else:
assistant = await litellm.acreate_assistants(
custom_llm_provider="openai",