Skip to content

Commit

Permalink
feat(api): updates (#1474)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot authored Jun 6, 2024
1 parent 2951f87 commit 3cde087
Show file tree
Hide file tree
Showing 11 changed files with 143 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 64
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-0577fd0d08da6b867b002a5accd45f7116ef91c4940b41cf45dc479938c77163.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-ff436357b12348b7c1c930469332a79cd23ac6ec537e645c411893c42de42e57.yml
34 changes: 34 additions & 0 deletions src/openai/resources/beta/threads/runs/runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def create(
None,
]
| NotGiven = NOT_GIVEN,
parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
response_format: Optional[AssistantResponseFormatOptionParam] | NotGiven = NOT_GIVEN,
stream: Optional[Literal[False]] | NotGiven = NOT_GIVEN,
temperature: Optional[float] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -152,6 +153,10 @@ def create(
model associated with the assistant. If not, the model associated with the
assistant will be used.
parallel_tool_calls: Whether to enable
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
during tool use.
response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
[GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
Expand Down Expand Up @@ -246,6 +251,7 @@ def create(
None,
]
| NotGiven = NOT_GIVEN,
parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
response_format: Optional[AssistantResponseFormatOptionParam] | NotGiven = NOT_GIVEN,
temperature: Optional[float] | NotGiven = NOT_GIVEN,
tool_choice: Optional[AssistantToolChoiceOptionParam] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -303,6 +309,10 @@ def create(
model associated with the assistant. If not, the model associated with the
assistant will be used.
parallel_tool_calls: Whether to enable
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
during tool use.
response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
[GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
Expand Down Expand Up @@ -393,6 +403,7 @@ def create(
None,
]
| NotGiven = NOT_GIVEN,
parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
response_format: Optional[AssistantResponseFormatOptionParam] | NotGiven = NOT_GIVEN,
temperature: Optional[float] | NotGiven = NOT_GIVEN,
tool_choice: Optional[AssistantToolChoiceOptionParam] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -450,6 +461,10 @@ def create(
model associated with the assistant. If not, the model associated with the
assistant will be used.
parallel_tool_calls: Whether to enable
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
during tool use.
response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
[GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
Expand Down Expand Up @@ -539,6 +554,7 @@ def create(
None,
]
| NotGiven = NOT_GIVEN,
parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
response_format: Optional[AssistantResponseFormatOptionParam] | NotGiven = NOT_GIVEN,
stream: Optional[Literal[False]] | Literal[True] | NotGiven = NOT_GIVEN,
temperature: Optional[float] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -568,6 +584,7 @@ def create(
"max_prompt_tokens": max_prompt_tokens,
"metadata": metadata,
"model": model,
"parallel_tool_calls": parallel_tool_calls,
"response_format": response_format,
"stream": stream,
"temperature": temperature,
Expand Down Expand Up @@ -975,6 +992,7 @@ async def create(
None,
]
| NotGiven = NOT_GIVEN,
parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
response_format: Optional[AssistantResponseFormatOptionParam] | NotGiven = NOT_GIVEN,
stream: Optional[Literal[False]] | NotGiven = NOT_GIVEN,
temperature: Optional[float] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -1029,6 +1047,10 @@ async def create(
model associated with the assistant. If not, the model associated with the
assistant will be used.
parallel_tool_calls: Whether to enable
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
during tool use.
response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
[GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
Expand Down Expand Up @@ -1123,6 +1145,7 @@ async def create(
None,
]
| NotGiven = NOT_GIVEN,
parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
response_format: Optional[AssistantResponseFormatOptionParam] | NotGiven = NOT_GIVEN,
temperature: Optional[float] | NotGiven = NOT_GIVEN,
tool_choice: Optional[AssistantToolChoiceOptionParam] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -1180,6 +1203,10 @@ async def create(
model associated with the assistant. If not, the model associated with the
assistant will be used.
parallel_tool_calls: Whether to enable
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
during tool use.
response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
[GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
Expand Down Expand Up @@ -1270,6 +1297,7 @@ async def create(
None,
]
| NotGiven = NOT_GIVEN,
parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
response_format: Optional[AssistantResponseFormatOptionParam] | NotGiven = NOT_GIVEN,
temperature: Optional[float] | NotGiven = NOT_GIVEN,
tool_choice: Optional[AssistantToolChoiceOptionParam] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -1327,6 +1355,10 @@ async def create(
model associated with the assistant. If not, the model associated with the
assistant will be used.
parallel_tool_calls: Whether to enable
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
during tool use.
response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
[GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
Expand Down Expand Up @@ -1416,6 +1448,7 @@ async def create(
None,
]
| NotGiven = NOT_GIVEN,
parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
response_format: Optional[AssistantResponseFormatOptionParam] | NotGiven = NOT_GIVEN,
stream: Optional[Literal[False]] | Literal[True] | NotGiven = NOT_GIVEN,
temperature: Optional[float] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -1445,6 +1478,7 @@ async def create(
"max_prompt_tokens": max_prompt_tokens,
"metadata": metadata,
"model": model,
"parallel_tool_calls": parallel_tool_calls,
"response_format": response_format,
"stream": stream,
"temperature": temperature,
Expand Down
34 changes: 34 additions & 0 deletions src/openai/resources/beta/threads/threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ def create_and_run(
None,
]
| NotGiven = NOT_GIVEN,
parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
response_format: Optional[AssistantResponseFormatOptionParam] | NotGiven = NOT_GIVEN,
stream: Optional[Literal[False]] | NotGiven = NOT_GIVEN,
temperature: Optional[float] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -331,6 +332,10 @@ def create_and_run(
model associated with the assistant. If not, the model associated with the
assistant will be used.
parallel_tool_calls: Whether to enable
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
during tool use.
response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
[GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
Expand Down Expand Up @@ -429,6 +434,7 @@ def create_and_run(
None,
]
| NotGiven = NOT_GIVEN,
parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
response_format: Optional[AssistantResponseFormatOptionParam] | NotGiven = NOT_GIVEN,
temperature: Optional[float] | NotGiven = NOT_GIVEN,
thread: thread_create_and_run_params.Thread | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -481,6 +487,10 @@ def create_and_run(
model associated with the assistant. If not, the model associated with the
assistant will be used.
parallel_tool_calls: Whether to enable
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
during tool use.
response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
[GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
Expand Down Expand Up @@ -575,6 +585,7 @@ def create_and_run(
None,
]
| NotGiven = NOT_GIVEN,
parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
response_format: Optional[AssistantResponseFormatOptionParam] | NotGiven = NOT_GIVEN,
temperature: Optional[float] | NotGiven = NOT_GIVEN,
thread: thread_create_and_run_params.Thread | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -627,6 +638,10 @@ def create_and_run(
model associated with the assistant. If not, the model associated with the
assistant will be used.
parallel_tool_calls: Whether to enable
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
during tool use.
response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
[GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
Expand Down Expand Up @@ -720,6 +735,7 @@ def create_and_run(
None,
]
| NotGiven = NOT_GIVEN,
parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
response_format: Optional[AssistantResponseFormatOptionParam] | NotGiven = NOT_GIVEN,
stream: Optional[Literal[False]] | Literal[True] | NotGiven = NOT_GIVEN,
temperature: Optional[float] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -747,6 +763,7 @@ def create_and_run(
"max_prompt_tokens": max_prompt_tokens,
"metadata": metadata,
"model": model,
"parallel_tool_calls": parallel_tool_calls,
"response_format": response_format,
"stream": stream,
"temperature": temperature,
Expand Down Expand Up @@ -997,6 +1014,7 @@ async def create_and_run(
None,
]
| NotGiven = NOT_GIVEN,
parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
response_format: Optional[AssistantResponseFormatOptionParam] | NotGiven = NOT_GIVEN,
stream: Optional[Literal[False]] | NotGiven = NOT_GIVEN,
temperature: Optional[float] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -1046,6 +1064,10 @@ async def create_and_run(
model associated with the assistant. If not, the model associated with the
assistant will be used.
parallel_tool_calls: Whether to enable
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
during tool use.
response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
[GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
Expand Down Expand Up @@ -1144,6 +1166,7 @@ async def create_and_run(
None,
]
| NotGiven = NOT_GIVEN,
parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
response_format: Optional[AssistantResponseFormatOptionParam] | NotGiven = NOT_GIVEN,
temperature: Optional[float] | NotGiven = NOT_GIVEN,
thread: thread_create_and_run_params.Thread | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -1196,6 +1219,10 @@ async def create_and_run(
model associated with the assistant. If not, the model associated with the
assistant will be used.
parallel_tool_calls: Whether to enable
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
during tool use.
response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
[GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
Expand Down Expand Up @@ -1290,6 +1317,7 @@ async def create_and_run(
None,
]
| NotGiven = NOT_GIVEN,
parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
response_format: Optional[AssistantResponseFormatOptionParam] | NotGiven = NOT_GIVEN,
temperature: Optional[float] | NotGiven = NOT_GIVEN,
thread: thread_create_and_run_params.Thread | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -1342,6 +1370,10 @@ async def create_and_run(
model associated with the assistant. If not, the model associated with the
assistant will be used.
parallel_tool_calls: Whether to enable
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
during tool use.
response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
[GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
Expand Down Expand Up @@ -1435,6 +1467,7 @@ async def create_and_run(
None,
]
| NotGiven = NOT_GIVEN,
parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
response_format: Optional[AssistantResponseFormatOptionParam] | NotGiven = NOT_GIVEN,
stream: Optional[Literal[False]] | Literal[True] | NotGiven = NOT_GIVEN,
temperature: Optional[float] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -1462,6 +1495,7 @@ async def create_and_run(
"max_prompt_tokens": max_prompt_tokens,
"metadata": metadata,
"model": model,
"parallel_tool_calls": parallel_tool_calls,
"response_format": response_format,
"stream": stream,
"temperature": temperature,
Expand Down
Loading

0 comments on commit 3cde087

Please sign in to comment.