mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fixes for assistans API tests
This commit is contained in:
parent
5bf76f0bb1
commit
a62805f98f
2 changed files with 8 additions and 5 deletions
|
@ -304,6 +304,11 @@ def create_assistants(
|
|||
"response_format": response_format,
|
||||
}
|
||||
|
||||
# only send params that are not None
|
||||
create_assistant_data = {
|
||||
k: v for k, v in create_assistant_data.items() if v is not None
|
||||
}
|
||||
|
||||
response: Optional[Union[Coroutine[Any, Any, Assistant], Assistant]] = None
|
||||
if custom_llm_provider == "openai":
|
||||
api_base = (
|
||||
|
|
|
@ -74,9 +74,10 @@ async def test_get_assistants(provider, sync_mode):
|
|||
@pytest.mark.flaky(retries=3, delay=1)
|
||||
async def test_create_delete_assistants(provider, sync_mode):
|
||||
litellm.ssl_verify = False
|
||||
litellm._turn_on_debug()
|
||||
data = {
|
||||
"custom_llm_provider": provider,
|
||||
"model": "gpt-4-turbo",
|
||||
"model": "gpt-4.5-preview",
|
||||
"instructions": "You are a personal math tutor. When asked a question, write and run Python code to answer the question.",
|
||||
"name": "Math Tutor",
|
||||
"tools": [{"type": "code_interpreter"}],
|
||||
|
@ -106,10 +107,7 @@ async def test_create_delete_assistants(provider, sync_mode):
|
|||
print("Response deleting assistant", response)
|
||||
assert response.id == assistant.id
|
||||
else:
|
||||
assistant = await litellm.acreate_assistants(
|
||||
custom_llm_provider=provider,
|
||||
**data,
|
||||
)
|
||||
assistant = await litellm.acreate_assistants(**data)
|
||||
print("New assistants", assistant)
|
||||
assert isinstance(assistant, Assistant)
|
||||
assert (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue