Skip to content

Commit c792e75

Browse files
feat(api): updates (#887)
1 parent ad9796f commit c792e75

File tree

7 files changed

+32
-1
lines changed

7 files changed

+32
-1
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 64
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-0577fd0d08da6b867b002a5accd45f7116ef91c4940b41cf45dc479938c77163.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-ff436357b12348b7c1c930469332a79cd23ac6ec537e645c411893c42de42e57.yml

src/resources/beta/threads/runs/runs.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,13 @@ export interface Run {
276276
*/
277277
object: 'thread.run';
278278

279+
/**
280+
* Whether to enable
281+
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling)
282+
* during tool use.
283+
*/
284+
parallel_tool_calls: boolean;
285+
279286
/**
280287
* Details on the action required to continue the run. Will be `null` if no action
281288
* is required.
@@ -559,6 +566,13 @@ export interface RunCreateParamsBase {
559566
| 'gpt-3.5-turbo-16k-0613'
560567
| null;
561568

569+
/**
570+
* Whether to enable
571+
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling)
572+
* during tool use.
573+
*/
574+
parallel_tool_calls?: boolean;
575+
562576
/**
563577
* Specifies the format that the model must output. Compatible with
564578
* [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),

src/resources/beta/threads/threads.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,13 @@ export interface ThreadCreateAndRunParamsBase {
536536
| 'gpt-3.5-turbo-16k-0613'
537537
| null;
538538

539+
/**
540+
* Whether to enable
541+
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling)
542+
* during tool use.
543+
*/
544+
parallel_tool_calls?: boolean;
545+
539546
/**
540547
* Specifies the format that the model must output. Compatible with
541548
* [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),

src/resources/chat/completions.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,13 @@ export interface ChatCompletionCreateParamsBase {
757757
*/
758758
n?: number | null;
759759

760+
/**
761+
* Whether to enable
762+
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling)
763+
* during tool use.
764+
*/
765+
parallel_tool_calls?: boolean;
766+
760767
/**
761768
* Number between -2.0 and 2.0. Positive values penalize new tokens based on
762769
* whether they appear in the text so far, increasing the model's likelihood to

tests/api-resources/beta/threads/runs/runs.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ describe('resource runs', () => {
124124
max_prompt_tokens: 256,
125125
metadata: {},
126126
model: 'gpt-4-turbo',
127+
parallel_tool_calls: true,
127128
response_format: 'none',
128129
stream: false,
129130
temperature: 1,

tests/api-resources/beta/threads/threads.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ describe('resource threads', () => {
213213
max_prompt_tokens: 256,
214214
metadata: {},
215215
model: 'gpt-4-turbo',
216+
parallel_tool_calls: true,
216217
response_format: 'none',
217218
stream: false,
218219
temperature: 1,

tests/api-resources/chat/completions.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ describe('resource completions', () => {
3434
logprobs: true,
3535
max_tokens: 0,
3636
n: 1,
37+
parallel_tool_calls: true,
3738
presence_penalty: -2,
3839
response_format: { type: 'json_object' },
3940
seed: -9223372036854776000,

0 commit comments

Comments
 (0)