diff --git a/.stats.yml b/.stats.yml index 11d2b0b18..eb81a249f 100644 --- a/.stats.yml +++ b/.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 diff --git a/src/resources/beta/threads/runs/runs.ts b/src/resources/beta/threads/runs/runs.ts index 9e44ccfe5..ed5a5ff68 100644 --- a/src/resources/beta/threads/runs/runs.ts +++ b/src/resources/beta/threads/runs/runs.ts @@ -402,6 +402,13 @@ export interface Run { */ object: 'thread.run'; + /** + * Whether to enable + * [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + * during tool use. + */ + parallel_tool_calls: boolean; + /** * Details on the action required to continue the run. Will be `null` if no action * is required. @@ -685,6 +692,13 @@ export interface RunCreateParamsBase { | 'gpt-3.5-turbo-16k-0613' | null; + /** + * Whether to enable + * [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + * during tool use. + */ + parallel_tool_calls?: boolean; + /** * Specifies the format that the model must output. Compatible with * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o), diff --git a/src/resources/beta/threads/threads.ts b/src/resources/beta/threads/threads.ts index 9d27b0328..6978e6eb5 100644 --- a/src/resources/beta/threads/threads.ts +++ b/src/resources/beta/threads/threads.ts @@ -560,6 +560,13 @@ export interface ThreadCreateAndRunParamsBase { | 'gpt-3.5-turbo-16k-0613' | null; + /** + * Whether to enable + * [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + * during tool use. + */ + parallel_tool_calls?: boolean; + /** * Specifies the format that the model must output. Compatible with * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o), diff --git a/src/resources/chat/completions.ts b/src/resources/chat/completions.ts index cbf7bcc2c..eeaab3d70 100644 --- a/src/resources/chat/completions.ts +++ b/src/resources/chat/completions.ts @@ -757,6 +757,13 @@ export interface ChatCompletionCreateParamsBase { */ n?: number | null; + /** + * Whether to enable + * [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + * during tool use. + */ + parallel_tool_calls?: boolean; + /** * 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 diff --git a/tests/api-resources/beta/threads/runs/runs.test.ts b/tests/api-resources/beta/threads/runs/runs.test.ts index 3ee6ecb4e..5aba82ff8 100644 --- a/tests/api-resources/beta/threads/runs/runs.test.ts +++ b/tests/api-resources/beta/threads/runs/runs.test.ts @@ -124,6 +124,7 @@ describe('resource runs', () => { max_prompt_tokens: 256, metadata: {}, model: 'gpt-4-turbo', + parallel_tool_calls: true, response_format: 'none', stream: false, temperature: 1, diff --git a/tests/api-resources/beta/threads/threads.test.ts b/tests/api-resources/beta/threads/threads.test.ts index ebc78f357..85f89533c 100644 --- a/tests/api-resources/beta/threads/threads.test.ts +++ b/tests/api-resources/beta/threads/threads.test.ts @@ -213,6 +213,7 @@ describe('resource threads', () => { max_prompt_tokens: 256, metadata: {}, model: 'gpt-4-turbo', + parallel_tool_calls: true, response_format: 'none', stream: false, temperature: 1, diff --git a/tests/api-resources/chat/completions.test.ts b/tests/api-resources/chat/completions.test.ts index 21277e1d6..9404e9e18 100644 --- a/tests/api-resources/chat/completions.test.ts +++ b/tests/api-resources/chat/completions.test.ts @@ -34,6 +34,7 @@ describe('resource completions', () => { logprobs: true, max_tokens: 0, n: 1, + parallel_tool_calls: true, presence_penalty: -2, response_format: { type: 'json_object' }, seed: -9223372036854776000,