diff --git a/tests/api_resources/beta/test_assistants.py b/tests/api_resources/beta/test_assistants.py index fbd5ff0597..642935cdaf 100644 --- a/tests/api_resources/beta/test_assistants.py +++ b/tests/api_resources/beta/test_assistants.py @@ -44,8 +44,8 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None: "vector_store_ids": ["string"], "vector_stores": [ { - "file_ids": ["string", "string", "string"], "chunking_strategy": {"type": "auto"}, + "file_ids": ["string", "string", "string"], "metadata": {}, } ], @@ -276,8 +276,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> "vector_store_ids": ["string"], "vector_stores": [ { - "file_ids": ["string", "string", "string"], "chunking_strategy": {"type": "auto"}, + "file_ids": ["string", "string", "string"], "metadata": {}, } ], diff --git a/tests/api_resources/beta/test_threads.py b/tests/api_resources/beta/test_threads.py index 67fff736dd..95bebd84f5 100644 --- a/tests/api_resources/beta/test_threads.py +++ b/tests/api_resources/beta/test_threads.py @@ -31,8 +31,8 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None: thread = client.beta.threads.create( messages=[ { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -62,8 +62,8 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None: "metadata": {}, }, { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -93,8 +93,8 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None: "metadata": {}, }, { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -131,8 +131,8 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None: "vector_store_ids": ["string"], "vector_stores": [ { - "file_ids": ["string", "string", "string"], "chunking_strategy": {"type": "auto"}, + "file_ids": ["string", "string", "string"], "metadata": {}, } ], @@ -310,8 +310,8 @@ def test_method_create_and_run_with_all_params_overload_1(self, client: OpenAI) thread={ "messages": [ { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -341,8 +341,8 @@ def test_method_create_and_run_with_all_params_overload_1(self, client: OpenAI) "metadata": {}, }, { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -372,8 +372,8 @@ def test_method_create_and_run_with_all_params_overload_1(self, client: OpenAI) "metadata": {}, }, { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -403,20 +403,20 @@ def test_method_create_and_run_with_all_params_overload_1(self, client: OpenAI) "metadata": {}, }, ], + "metadata": {}, "tool_resources": { "code_interpreter": {"file_ids": ["string", "string", "string"]}, "file_search": { "vector_store_ids": ["string"], "vector_stores": [ { - "file_ids": ["string", "string", "string"], "chunking_strategy": {"type": "auto"}, + "file_ids": ["string", "string", "string"], "metadata": {}, } ], }, }, - "metadata": {}, }, tool_choice="none", tool_resources={ @@ -480,8 +480,8 @@ def test_method_create_and_run_with_all_params_overload_2(self, client: OpenAI) thread={ "messages": [ { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -511,8 +511,8 @@ def test_method_create_and_run_with_all_params_overload_2(self, client: OpenAI) "metadata": {}, }, { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -542,8 +542,8 @@ def test_method_create_and_run_with_all_params_overload_2(self, client: OpenAI) "metadata": {}, }, { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -573,20 +573,20 @@ def test_method_create_and_run_with_all_params_overload_2(self, client: OpenAI) "metadata": {}, }, ], + "metadata": {}, "tool_resources": { "code_interpreter": {"file_ids": ["string", "string", "string"]}, "file_search": { "vector_store_ids": ["string"], "vector_stores": [ { - "file_ids": ["string", "string", "string"], "chunking_strategy": {"type": "auto"}, + "file_ids": ["string", "string", "string"], "metadata": {}, } ], }, }, - "metadata": {}, }, tool_choice="none", tool_resources={ @@ -641,8 +641,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> thread = await async_client.beta.threads.create( messages=[ { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -672,8 +672,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> "metadata": {}, }, { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -703,8 +703,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> "metadata": {}, }, { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -741,8 +741,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> "vector_store_ids": ["string"], "vector_stores": [ { - "file_ids": ["string", "string", "string"], "chunking_strategy": {"type": "auto"}, + "file_ids": ["string", "string", "string"], "metadata": {}, } ], @@ -920,8 +920,8 @@ async def test_method_create_and_run_with_all_params_overload_1(self, async_clie thread={ "messages": [ { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -951,8 +951,8 @@ async def test_method_create_and_run_with_all_params_overload_1(self, async_clie "metadata": {}, }, { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -982,8 +982,8 @@ async def test_method_create_and_run_with_all_params_overload_1(self, async_clie "metadata": {}, }, { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -1013,20 +1013,20 @@ async def test_method_create_and_run_with_all_params_overload_1(self, async_clie "metadata": {}, }, ], + "metadata": {}, "tool_resources": { "code_interpreter": {"file_ids": ["string", "string", "string"]}, "file_search": { "vector_store_ids": ["string"], "vector_stores": [ { - "file_ids": ["string", "string", "string"], "chunking_strategy": {"type": "auto"}, + "file_ids": ["string", "string", "string"], "metadata": {}, } ], }, }, - "metadata": {}, }, tool_choice="none", tool_resources={ @@ -1090,8 +1090,8 @@ async def test_method_create_and_run_with_all_params_overload_2(self, async_clie thread={ "messages": [ { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -1121,8 +1121,8 @@ async def test_method_create_and_run_with_all_params_overload_2(self, async_clie "metadata": {}, }, { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -1152,8 +1152,8 @@ async def test_method_create_and_run_with_all_params_overload_2(self, async_clie "metadata": {}, }, { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -1183,20 +1183,20 @@ async def test_method_create_and_run_with_all_params_overload_2(self, async_clie "metadata": {}, }, ], + "metadata": {}, "tool_resources": { "code_interpreter": {"file_ids": ["string", "string", "string"]}, "file_search": { "vector_store_ids": ["string"], "vector_stores": [ { - "file_ids": ["string", "string", "string"], "chunking_strategy": {"type": "auto"}, + "file_ids": ["string", "string", "string"], "metadata": {}, } ], }, }, - "metadata": {}, }, tool_choice="none", tool_resources={ diff --git a/tests/api_resources/beta/threads/test_runs.py b/tests/api_resources/beta/threads/test_runs.py index e21c6c2c77..5d16bdb364 100644 --- a/tests/api_resources/beta/threads/test_runs.py +++ b/tests/api_resources/beta/threads/test_runs.py @@ -38,8 +38,8 @@ def test_method_create_with_all_params_overload_1(self, client: OpenAI) -> None: additional_instructions="string", additional_messages=[ { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -69,8 +69,8 @@ def test_method_create_with_all_params_overload_1(self, client: OpenAI) -> None: "metadata": {}, }, { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -100,8 +100,8 @@ def test_method_create_with_all_params_overload_1(self, client: OpenAI) -> None: "metadata": {}, }, { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -202,8 +202,8 @@ def test_method_create_with_all_params_overload_2(self, client: OpenAI) -> None: additional_instructions="string", additional_messages=[ { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -233,8 +233,8 @@ def test_method_create_with_all_params_overload_2(self, client: OpenAI) -> None: "metadata": {}, }, { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -264,8 +264,8 @@ def test_method_create_with_all_params_overload_2(self, client: OpenAI) -> None: "metadata": {}, }, { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -567,16 +567,16 @@ def test_method_submit_tool_outputs_with_all_params_overload_1(self, client: Ope thread_id="string", tool_outputs=[ { - "tool_call_id": "string", - "output": "string", + "output": "output", + "tool_call_id": "tool_call_id", }, { - "tool_call_id": "string", - "output": "string", + "output": "output", + "tool_call_id": "tool_call_id", }, { - "tool_call_id": "string", - "output": "string", + "output": "output", + "tool_call_id": "tool_call_id", }, ], stream=False, @@ -704,8 +704,8 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn additional_instructions="string", additional_messages=[ { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -735,8 +735,8 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn "metadata": {}, }, { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -766,8 +766,8 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn "metadata": {}, }, { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -868,8 +868,8 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn additional_instructions="string", additional_messages=[ { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -899,8 +899,8 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn "metadata": {}, }, { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -930,8 +930,8 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn "metadata": {}, }, { - "role": "user", "content": "string", + "role": "user", "attachments": [ { "file_id": "string", @@ -1233,16 +1233,16 @@ async def test_method_submit_tool_outputs_with_all_params_overload_1(self, async thread_id="string", tool_outputs=[ { - "tool_call_id": "string", - "output": "string", + "output": "output", + "tool_call_id": "tool_call_id", }, { - "tool_call_id": "string", - "output": "string", + "output": "output", + "tool_call_id": "tool_call_id", }, { - "tool_call_id": "string", - "output": "string", + "output": "output", + "tool_call_id": "tool_call_id", }, ], stream=False, diff --git a/tests/api_resources/chat/test_completions.py b/tests/api_resources/chat/test_completions.py index 9fa3cc8284..0b89fbf9cd 100644 --- a/tests/api_resources/chat/test_completions.py +++ b/tests/api_resources/chat/test_completions.py @@ -48,8 +48,8 @@ def test_method_create_with_all_params_overload_1(self, client: OpenAI) -> None: function_call="none", functions=[ { - "description": "string", - "name": "string", + "name": "name", + "description": "description", "parameters": {"foo": "bar"}, } ], @@ -69,31 +69,31 @@ def test_method_create_with_all_params_overload_1(self, client: OpenAI) -> None: tool_choice="none", tools=[ { - "type": "function", "function": { - "description": "string", - "name": "string", + "name": "name", + "description": "description", "parameters": {"foo": "bar"}, "strict": True, }, + "type": "function", }, { - "type": "function", "function": { - "description": "string", - "name": "string", + "name": "name", + "description": "description", "parameters": {"foo": "bar"}, "strict": True, }, + "type": "function", }, { - "type": "function", "function": { - "description": "string", - "name": "string", + "name": "name", + "description": "description", "parameters": {"foo": "bar"}, "strict": True, }, + "type": "function", }, ], top_logprobs=0, @@ -168,8 +168,8 @@ def test_method_create_with_all_params_overload_2(self, client: OpenAI) -> None: function_call="none", functions=[ { - "description": "string", - "name": "string", + "name": "name", + "description": "description", "parameters": {"foo": "bar"}, } ], @@ -188,31 +188,31 @@ def test_method_create_with_all_params_overload_2(self, client: OpenAI) -> None: tool_choice="none", tools=[ { - "type": "function", "function": { - "description": "string", - "name": "string", + "name": "name", + "description": "description", "parameters": {"foo": "bar"}, "strict": True, }, + "type": "function", }, { - "type": "function", "function": { - "description": "string", - "name": "string", + "name": "name", + "description": "description", "parameters": {"foo": "bar"}, "strict": True, }, + "type": "function", }, { - "type": "function", "function": { - "description": "string", - "name": "string", + "name": "name", + "description": "description", "parameters": {"foo": "bar"}, "strict": True, }, + "type": "function", }, ], top_logprobs=0, @@ -307,8 +307,8 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn function_call="none", functions=[ { - "description": "string", - "name": "string", + "name": "name", + "description": "description", "parameters": {"foo": "bar"}, } ], @@ -328,31 +328,31 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn tool_choice="none", tools=[ { - "type": "function", "function": { - "description": "string", - "name": "string", + "name": "name", + "description": "description", "parameters": {"foo": "bar"}, "strict": True, }, + "type": "function", }, { - "type": "function", "function": { - "description": "string", - "name": "string", + "name": "name", + "description": "description", "parameters": {"foo": "bar"}, "strict": True, }, + "type": "function", }, { - "type": "function", "function": { - "description": "string", - "name": "string", + "name": "name", + "description": "description", "parameters": {"foo": "bar"}, "strict": True, }, + "type": "function", }, ], top_logprobs=0, @@ -427,8 +427,8 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn function_call="none", functions=[ { - "description": "string", - "name": "string", + "name": "name", + "description": "description", "parameters": {"foo": "bar"}, } ], @@ -447,31 +447,31 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn tool_choice="none", tools=[ { - "type": "function", "function": { - "description": "string", - "name": "string", + "name": "name", + "description": "description", "parameters": {"foo": "bar"}, "strict": True, }, + "type": "function", }, { - "type": "function", "function": { - "description": "string", - "name": "string", + "name": "name", + "description": "description", "parameters": {"foo": "bar"}, "strict": True, }, + "type": "function", }, { - "type": "function", "function": { - "description": "string", - "name": "string", + "name": "name", + "description": "description", "parameters": {"foo": "bar"}, "strict": True, }, + "type": "function", }, ], top_logprobs=0, diff --git a/tests/api_resources/fine_tuning/test_jobs.py b/tests/api_resources/fine_tuning/test_jobs.py index 68b3d73ac5..d1ad611219 100644 --- a/tests/api_resources/fine_tuning/test_jobs.py +++ b/tests/api_resources/fine_tuning/test_jobs.py @@ -44,8 +44,8 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None: "type": "wandb", "wandb": { "project": "my-wandb-project", - "name": "string", - "entity": "string", + "entity": "entity", + "name": "name", "tags": ["custom-tag", "custom-tag", "custom-tag"], }, }, @@ -53,8 +53,8 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None: "type": "wandb", "wandb": { "project": "my-wandb-project", - "name": "string", - "entity": "string", + "entity": "entity", + "name": "name", "tags": ["custom-tag", "custom-tag", "custom-tag"], }, }, @@ -62,8 +62,8 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None: "type": "wandb", "wandb": { "project": "my-wandb-project", - "name": "string", - "entity": "string", + "entity": "entity", + "name": "name", "tags": ["custom-tag", "custom-tag", "custom-tag"], }, }, @@ -283,8 +283,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> "type": "wandb", "wandb": { "project": "my-wandb-project", - "name": "string", - "entity": "string", + "entity": "entity", + "name": "name", "tags": ["custom-tag", "custom-tag", "custom-tag"], }, }, @@ -292,8 +292,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> "type": "wandb", "wandb": { "project": "my-wandb-project", - "name": "string", - "entity": "string", + "entity": "entity", + "name": "name", "tags": ["custom-tag", "custom-tag", "custom-tag"], }, }, @@ -301,8 +301,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> "type": "wandb", "wandb": { "project": "my-wandb-project", - "name": "string", - "entity": "string", + "entity": "entity", + "name": "name", "tags": ["custom-tag", "custom-tag", "custom-tag"], }, }, diff --git a/tests/api_resources/test_images.py b/tests/api_resources/test_images.py index 2e31f3354a..9bc9719bc5 100644 --- a/tests/api_resources/test_images.py +++ b/tests/api_resources/test_images.py @@ -31,7 +31,7 @@ def test_method_create_variation_with_all_params(self, client: OpenAI) -> None: model="dall-e-2", n=1, response_format="url", - size="1024x1024", + size="256x256", user="user-1234", ) assert_matches_type(ImagesResponse, image, path=["response"]) @@ -77,7 +77,7 @@ def test_method_edit_with_all_params(self, client: OpenAI) -> None: model="dall-e-2", n=1, response_format="url", - size="1024x1024", + size="256x256", user="user-1234", ) assert_matches_type(ImagesResponse, image, path=["response"]) @@ -123,7 +123,7 @@ def test_method_generate_with_all_params(self, client: OpenAI) -> None: n=1, quality="standard", response_format="url", - size="1024x1024", + size="256x256", style="vivid", user="user-1234", ) @@ -171,7 +171,7 @@ async def test_method_create_variation_with_all_params(self, async_client: Async model="dall-e-2", n=1, response_format="url", - size="1024x1024", + size="256x256", user="user-1234", ) assert_matches_type(ImagesResponse, image, path=["response"]) @@ -217,7 +217,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncOpenAI) -> N model="dall-e-2", n=1, response_format="url", - size="1024x1024", + size="256x256", user="user-1234", ) assert_matches_type(ImagesResponse, image, path=["response"]) @@ -263,7 +263,7 @@ async def test_method_generate_with_all_params(self, async_client: AsyncOpenAI) n=1, quality="standard", response_format="url", - size="1024x1024", + size="256x256", style="vivid", user="user-1234", )