Commit 7399ffc8
Changed files (11)
src
openai
resources
beta
threads
chat
types
tests
api_resources
beta
threads
src/openai/resources/beta/threads/runs/runs.py
@@ -109,6 +109,7 @@ class Runs(SyncAPIResource):
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,
@@ -163,6 +164,10 @@ class Runs(SyncAPIResource):
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),
@@ -257,6 +262,7 @@ class Runs(SyncAPIResource):
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,
@@ -314,6 +320,10 @@ class Runs(SyncAPIResource):
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),
@@ -404,6 +414,7 @@ class Runs(SyncAPIResource):
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,
@@ -461,6 +472,10 @@ class Runs(SyncAPIResource):
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),
@@ -550,6 +565,7 @@ class Runs(SyncAPIResource):
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,
@@ -579,6 +595,7 @@ class Runs(SyncAPIResource):
"max_prompt_tokens": max_prompt_tokens,
"metadata": metadata,
"model": model,
+ "parallel_tool_calls": parallel_tool_calls,
"response_format": response_format,
"stream": stream,
"temperature": temperature,
@@ -1666,6 +1683,7 @@ class AsyncRuns(AsyncAPIResource):
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,
@@ -1720,6 +1738,10 @@ class AsyncRuns(AsyncAPIResource):
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),
@@ -1814,6 +1836,7 @@ class AsyncRuns(AsyncAPIResource):
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,
@@ -1871,6 +1894,10 @@ class AsyncRuns(AsyncAPIResource):
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),
@@ -1961,6 +1988,7 @@ class AsyncRuns(AsyncAPIResource):
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,
@@ -2018,6 +2046,10 @@ class AsyncRuns(AsyncAPIResource):
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),
@@ -2107,6 +2139,7 @@ class AsyncRuns(AsyncAPIResource):
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,
@@ -2136,6 +2169,7 @@ class AsyncRuns(AsyncAPIResource):
"max_prompt_tokens": max_prompt_tokens,
"metadata": metadata,
"model": model,
+ "parallel_tool_calls": parallel_tool_calls,
"response_format": response_format,
"stream": stream,
"temperature": temperature,
src/openai/resources/beta/threads/threads.py
@@ -291,6 +291,7 @@ class Threads(SyncAPIResource):
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,
@@ -340,6 +341,10 @@ class Threads(SyncAPIResource):
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),
@@ -438,6 +443,7 @@ class Threads(SyncAPIResource):
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,
@@ -490,6 +496,10 @@ class Threads(SyncAPIResource):
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),
@@ -584,6 +594,7 @@ class Threads(SyncAPIResource):
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,
@@ -636,6 +647,10 @@ class Threads(SyncAPIResource):
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),
@@ -729,6 +744,7 @@ class Threads(SyncAPIResource):
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,
@@ -756,6 +772,7 @@ class Threads(SyncAPIResource):
"max_prompt_tokens": max_prompt_tokens,
"metadata": metadata,
"model": model,
+ "parallel_tool_calls": parallel_tool_calls,
"response_format": response_format,
"stream": stream,
"temperature": temperature,
@@ -1284,6 +1301,7 @@ class AsyncThreads(AsyncAPIResource):
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,
@@ -1333,6 +1351,10 @@ class AsyncThreads(AsyncAPIResource):
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),
@@ -1431,6 +1453,7 @@ class AsyncThreads(AsyncAPIResource):
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,
@@ -1483,6 +1506,10 @@ class AsyncThreads(AsyncAPIResource):
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),
@@ -1577,6 +1604,7 @@ class AsyncThreads(AsyncAPIResource):
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,
@@ -1629,6 +1657,10 @@ class AsyncThreads(AsyncAPIResource):
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),
@@ -1722,6 +1754,7 @@ class AsyncThreads(AsyncAPIResource):
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,
@@ -1749,6 +1782,7 @@ class AsyncThreads(AsyncAPIResource):
"max_prompt_tokens": max_prompt_tokens,
"metadata": metadata,
"model": model,
+ "parallel_tool_calls": parallel_tool_calls,
"response_format": response_format,
"stream": stream,
"temperature": temperature,
src/openai/resources/chat/completions.py
@@ -55,6 +55,7 @@ class Completions(SyncAPIResource):
logprobs: Optional[bool] | NotGiven = NOT_GIVEN,
max_tokens: Optional[int] | NotGiven = NOT_GIVEN,
n: Optional[int] | NotGiven = NOT_GIVEN,
+ parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
presence_penalty: Optional[float] | NotGiven = NOT_GIVEN,
response_format: completion_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
seed: Optional[int] | NotGiven = NOT_GIVEN,
@@ -131,6 +132,10 @@ class Completions(SyncAPIResource):
you will be charged based on the number of generated tokens across all of the
choices. Keep `n` as `1` to minimize costs.
+ parallel_tool_calls: Whether to enable
+ [parallel function calling](https://platform.openai.com/docs/guides/function-calling)
+ during tool use.
+
presence_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on
whether they appear in the text so far, increasing the model's likelihood to
talk about new topics.
@@ -227,6 +232,7 @@ class Completions(SyncAPIResource):
logprobs: Optional[bool] | NotGiven = NOT_GIVEN,
max_tokens: Optional[int] | NotGiven = NOT_GIVEN,
n: Optional[int] | NotGiven = NOT_GIVEN,
+ parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
presence_penalty: Optional[float] | NotGiven = NOT_GIVEN,
response_format: completion_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
seed: Optional[int] | NotGiven = NOT_GIVEN,
@@ -309,6 +315,10 @@ class Completions(SyncAPIResource):
you will be charged based on the number of generated tokens across all of the
choices. Keep `n` as `1` to minimize costs.
+ parallel_tool_calls: Whether to enable
+ [parallel function calling](https://platform.openai.com/docs/guides/function-calling)
+ during tool use.
+
presence_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on
whether they appear in the text so far, increasing the model's likelihood to
talk about new topics.
@@ -398,6 +408,7 @@ class Completions(SyncAPIResource):
logprobs: Optional[bool] | NotGiven = NOT_GIVEN,
max_tokens: Optional[int] | NotGiven = NOT_GIVEN,
n: Optional[int] | NotGiven = NOT_GIVEN,
+ parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
presence_penalty: Optional[float] | NotGiven = NOT_GIVEN,
response_format: completion_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
seed: Optional[int] | NotGiven = NOT_GIVEN,
@@ -480,6 +491,10 @@ class Completions(SyncAPIResource):
you will be charged based on the number of generated tokens across all of the
choices. Keep `n` as `1` to minimize costs.
+ parallel_tool_calls: Whether to enable
+ [parallel function calling](https://platform.openai.com/docs/guides/function-calling)
+ during tool use.
+
presence_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on
whether they appear in the text so far, increasing the model's likelihood to
talk about new topics.
@@ -568,6 +583,7 @@ class Completions(SyncAPIResource):
logprobs: Optional[bool] | NotGiven = NOT_GIVEN,
max_tokens: Optional[int] | NotGiven = NOT_GIVEN,
n: Optional[int] | NotGiven = NOT_GIVEN,
+ parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
presence_penalty: Optional[float] | NotGiven = NOT_GIVEN,
response_format: completion_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
seed: Optional[int] | NotGiven = NOT_GIVEN,
@@ -600,6 +616,7 @@ class Completions(SyncAPIResource):
"logprobs": logprobs,
"max_tokens": max_tokens,
"n": n,
+ "parallel_tool_calls": parallel_tool_calls,
"presence_penalty": presence_penalty,
"response_format": response_format,
"seed": seed,
@@ -646,6 +663,7 @@ class AsyncCompletions(AsyncAPIResource):
logprobs: Optional[bool] | NotGiven = NOT_GIVEN,
max_tokens: Optional[int] | NotGiven = NOT_GIVEN,
n: Optional[int] | NotGiven = NOT_GIVEN,
+ parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
presence_penalty: Optional[float] | NotGiven = NOT_GIVEN,
response_format: completion_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
seed: Optional[int] | NotGiven = NOT_GIVEN,
@@ -722,6 +740,10 @@ class AsyncCompletions(AsyncAPIResource):
you will be charged based on the number of generated tokens across all of the
choices. Keep `n` as `1` to minimize costs.
+ parallel_tool_calls: Whether to enable
+ [parallel function calling](https://platform.openai.com/docs/guides/function-calling)
+ during tool use.
+
presence_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on
whether they appear in the text so far, increasing the model's likelihood to
talk about new topics.
@@ -818,6 +840,7 @@ class AsyncCompletions(AsyncAPIResource):
logprobs: Optional[bool] | NotGiven = NOT_GIVEN,
max_tokens: Optional[int] | NotGiven = NOT_GIVEN,
n: Optional[int] | NotGiven = NOT_GIVEN,
+ parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
presence_penalty: Optional[float] | NotGiven = NOT_GIVEN,
response_format: completion_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
seed: Optional[int] | NotGiven = NOT_GIVEN,
@@ -900,6 +923,10 @@ class AsyncCompletions(AsyncAPIResource):
you will be charged based on the number of generated tokens across all of the
choices. Keep `n` as `1` to minimize costs.
+ parallel_tool_calls: Whether to enable
+ [parallel function calling](https://platform.openai.com/docs/guides/function-calling)
+ during tool use.
+
presence_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on
whether they appear in the text so far, increasing the model's likelihood to
talk about new topics.
@@ -989,6 +1016,7 @@ class AsyncCompletions(AsyncAPIResource):
logprobs: Optional[bool] | NotGiven = NOT_GIVEN,
max_tokens: Optional[int] | NotGiven = NOT_GIVEN,
n: Optional[int] | NotGiven = NOT_GIVEN,
+ parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
presence_penalty: Optional[float] | NotGiven = NOT_GIVEN,
response_format: completion_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
seed: Optional[int] | NotGiven = NOT_GIVEN,
@@ -1071,6 +1099,10 @@ class AsyncCompletions(AsyncAPIResource):
you will be charged based on the number of generated tokens across all of the
choices. Keep `n` as `1` to minimize costs.
+ parallel_tool_calls: Whether to enable
+ [parallel function calling](https://platform.openai.com/docs/guides/function-calling)
+ during tool use.
+
presence_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on
whether they appear in the text so far, increasing the model's likelihood to
talk about new topics.
@@ -1159,6 +1191,7 @@ class AsyncCompletions(AsyncAPIResource):
logprobs: Optional[bool] | NotGiven = NOT_GIVEN,
max_tokens: Optional[int] | NotGiven = NOT_GIVEN,
n: Optional[int] | NotGiven = NOT_GIVEN,
+ parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
presence_penalty: Optional[float] | NotGiven = NOT_GIVEN,
response_format: completion_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
seed: Optional[int] | NotGiven = NOT_GIVEN,
@@ -1191,6 +1224,7 @@ class AsyncCompletions(AsyncAPIResource):
"logprobs": logprobs,
"max_tokens": max_tokens,
"n": n,
+ "parallel_tool_calls": parallel_tool_calls,
"presence_penalty": presence_penalty,
"response_format": response_format,
"seed": seed,
src/openai/types/beta/threads/run.py
@@ -151,6 +151,13 @@ class Run(BaseModel):
object: Literal["thread.run"]
"""The object type, which is always `thread.run`."""
+ parallel_tool_calls: bool
+ """
+ Whether to enable
+ [parallel function calling](https://platform.openai.com/docs/guides/function-calling)
+ during tool use.
+ """
+
required_action: Optional[RequiredAction] = None
"""Details on the action required to continue the run.
src/openai/types/beta/threads/run_create_params.py
@@ -107,6 +107,13 @@ class RunCreateParamsBase(TypedDict, total=False):
assistant will be used.
"""
+ parallel_tool_calls: bool
+ """
+ Whether to enable
+ [parallel function calling](https://platform.openai.com/docs/guides/function-calling)
+ during tool use.
+ """
+
response_format: Optional[AssistantResponseFormatOptionParam]
"""Specifies the format that the model must output.
src/openai/types/beta/thread_create_and_run_params.py
@@ -109,6 +109,13 @@ class ThreadCreateAndRunParamsBase(TypedDict, total=False):
assistant will be used.
"""
+ parallel_tool_calls: bool
+ """
+ Whether to enable
+ [parallel function calling](https://platform.openai.com/docs/guides/function-calling)
+ during tool use.
+ """
+
response_format: Optional[AssistantResponseFormatOptionParam]
"""Specifies the format that the model must output.
src/openai/types/chat/completion_create_params.py
@@ -102,6 +102,13 @@ class CompletionCreateParamsBase(TypedDict, total=False):
of the choices. Keep `n` as `1` to minimize costs.
"""
+ parallel_tool_calls: bool
+ """
+ Whether to enable
+ [parallel function calling](https://platform.openai.com/docs/guides/function-calling)
+ during tool use.
+ """
+
presence_penalty: Optional[float]
"""Number between -2.0 and 2.0.
tests/api_resources/beta/threads/test_runs.py
@@ -136,6 +136,7 @@ class TestRuns:
max_prompt_tokens=256,
metadata={},
model="gpt-4-turbo",
+ parallel_tool_calls=True,
response_format="none",
stream=False,
temperature=1,
@@ -299,6 +300,7 @@ class TestRuns:
max_prompt_tokens=256,
metadata={},
model="gpt-4-turbo",
+ parallel_tool_calls=True,
response_format="none",
temperature=1,
tool_choice="none",
@@ -800,6 +802,7 @@ class TestAsyncRuns:
max_prompt_tokens=256,
metadata={},
model="gpt-4-turbo",
+ parallel_tool_calls=True,
response_format="none",
stream=False,
temperature=1,
@@ -963,6 +966,7 @@ class TestAsyncRuns:
max_prompt_tokens=256,
metadata={},
model="gpt-4-turbo",
+ parallel_tool_calls=True,
response_format="none",
temperature=1,
tool_choice="none",
tests/api_resources/beta/test_threads.py
@@ -303,6 +303,7 @@ class TestThreads:
max_prompt_tokens=256,
metadata={},
model="gpt-4-turbo",
+ parallel_tool_calls=True,
response_format="none",
stream=False,
temperature=1,
@@ -473,6 +474,7 @@ class TestThreads:
max_prompt_tokens=256,
metadata={},
model="gpt-4-turbo",
+ parallel_tool_calls=True,
response_format="none",
temperature=1,
thread={
@@ -911,6 +913,7 @@ class TestAsyncThreads:
max_prompt_tokens=256,
metadata={},
model="gpt-4-turbo",
+ parallel_tool_calls=True,
response_format="none",
stream=False,
temperature=1,
@@ -1081,6 +1084,7 @@ class TestAsyncThreads:
max_prompt_tokens=256,
metadata={},
model="gpt-4-turbo",
+ parallel_tool_calls=True,
response_format="none",
temperature=1,
thread={
tests/api_resources/chat/test_completions.py
@@ -56,6 +56,7 @@ class TestCompletions:
logprobs=True,
max_tokens=0,
n=1,
+ parallel_tool_calls=True,
presence_penalty=-2,
response_format={"type": "json_object"},
seed=-9223372036854776000,
@@ -171,6 +172,7 @@ class TestCompletions:
logprobs=True,
max_tokens=0,
n=1,
+ parallel_tool_calls=True,
presence_penalty=-2,
response_format={"type": "json_object"},
seed=-9223372036854776000,
@@ -288,6 +290,7 @@ class TestAsyncCompletions:
logprobs=True,
max_tokens=0,
n=1,
+ parallel_tool_calls=True,
presence_penalty=-2,
response_format={"type": "json_object"},
seed=-9223372036854776000,
@@ -403,6 +406,7 @@ class TestAsyncCompletions:
logprobs=True,
max_tokens=0,
n=1,
+ parallel_tool_calls=True,
presence_penalty=-2,
response_format={"type": "json_object"},
seed=-9223372036854776000,
.stats.yml
@@ -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