Skip to content

Commit

Permalink
chore(tests): limit array example length (openai#1870)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stainless Bot authored and stainless-app[bot] committed Nov 19, 2024
1 parent c4e29df commit 108b30c
Show file tree
Hide file tree
Showing 9 changed files with 146 additions and 1,106 deletions.
4 changes: 2 additions & 2 deletions tests/api_resources/audio/test_transcriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None:
prompt="string",
response_format="json",
temperature=0,
timestamp_granularities=["word", "segment"],
timestamp_granularities=["word"],
)
assert_matches_type(TranscriptionCreateResponse, transcription, path=["response"])

Expand Down Expand Up @@ -85,7 +85,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) ->
prompt="string",
response_format="json",
temperature=0,
timestamp_granularities=["word", "segment"],
timestamp_granularities=["word"],
)
assert_matches_type(TranscriptionCreateResponse, transcription, path=["response"])

Expand Down
20 changes: 10 additions & 10 deletions tests/api_resources/beta/test_assistants.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None:
response_format="auto",
temperature=1,
tool_resources={
"code_interpreter": {"file_ids": ["string", "string", "string"]},
"code_interpreter": {"file_ids": ["string"]},
"file_search": {
"vector_store_ids": ["string"],
"vector_stores": [
{
"chunking_strategy": {"type": "auto"},
"file_ids": ["string", "string", "string"],
"file_ids": ["string"],
"metadata": {},
}
],
},
},
tools=[{"type": "code_interpreter"}, {"type": "code_interpreter"}, {"type": "code_interpreter"}],
tools=[{"type": "code_interpreter"}],
top_p=1,
)
assert_matches_type(Assistant, assistant, path=["response"])
Expand Down Expand Up @@ -137,10 +137,10 @@ def test_method_update_with_all_params(self, client: OpenAI) -> None:
response_format="auto",
temperature=1,
tool_resources={
"code_interpreter": {"file_ids": ["string", "string", "string"]},
"code_interpreter": {"file_ids": ["string"]},
"file_search": {"vector_store_ids": ["string"]},
},
tools=[{"type": "code_interpreter"}, {"type": "code_interpreter"}, {"type": "code_interpreter"}],
tools=[{"type": "code_interpreter"}],
top_p=1,
)
assert_matches_type(Assistant, assistant, path=["response"])
Expand Down Expand Up @@ -271,19 +271,19 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) ->
response_format="auto",
temperature=1,
tool_resources={
"code_interpreter": {"file_ids": ["string", "string", "string"]},
"code_interpreter": {"file_ids": ["string"]},
"file_search": {
"vector_store_ids": ["string"],
"vector_stores": [
{
"chunking_strategy": {"type": "auto"},
"file_ids": ["string", "string", "string"],
"file_ids": ["string"],
"metadata": {},
}
],
},
},
tools=[{"type": "code_interpreter"}, {"type": "code_interpreter"}, {"type": "code_interpreter"}],
tools=[{"type": "code_interpreter"}],
top_p=1,
)
assert_matches_type(Assistant, assistant, path=["response"])
Expand Down Expand Up @@ -369,10 +369,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncOpenAI) ->
response_format="auto",
temperature=1,
tool_resources={
"code_interpreter": {"file_ids": ["string", "string", "string"]},
"code_interpreter": {"file_ids": ["string"]},
"file_search": {"vector_store_ids": ["string"]},
},
tools=[{"type": "code_interpreter"}, {"type": "code_interpreter"}, {"type": "code_interpreter"}],
tools=[{"type": "code_interpreter"}],
top_p=1,
)
assert_matches_type(Assistant, assistant, path=["response"])
Expand Down
Loading

0 comments on commit 108b30c

Please sign in to comment.