Skip to content

Commit

Permalink
feat(api): updates (#887)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot authored and stainless-app[bot] committed Jun 6, 2024
1 parent c15c635 commit ab688c2
Show file tree
Hide file tree
Showing 7 changed files with 32 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
14 changes: 14 additions & 0 deletions src/resources/beta/threads/runs/runs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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),
Expand Down
7 changes: 7 additions & 0 deletions src/resources/beta/threads/threads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
7 changes: 7 additions & 0 deletions src/resources/chat/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/api-resources/beta/threads/runs/runs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions tests/api-resources/beta/threads/threads.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions tests/api-resources/chat/completions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ab688c2

Please sign in to comment.