Skip to content

Commit

Permalink
fix: remove erroneous thread create argument (#889)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot authored Jun 7, 2024
1 parent c792e75 commit f932adc
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 10 deletions.
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-ff436357b12348b7c1c930469332a79cd23ac6ec537e645c411893c42de42e57.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-c085faf70d6ff059fbe11b7b6b98123a612524cb9b8a6f649c99526e5b0b1bdb.yml
22 changes: 20 additions & 2 deletions src/resources/beta/threads/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,16 @@ export namespace Message {
/**
* The tools to add this file to.
*/
tools?: Array<AssistantsAPI.CodeInterpreterTool | AssistantsAPI.FileSearchTool>;
tools?: Array<AssistantsAPI.CodeInterpreterTool | Attachment.AssistantToolsFileSearchTypeOnly>;
}

export namespace Attachment {
export interface AssistantToolsFileSearchTypeOnly {
/**
* The type of tool being defined: `file_search`
*/
type: 'file_search';
}
}

/**
Expand Down Expand Up @@ -637,7 +646,16 @@ export namespace MessageCreateParams {
/**
* The tools to add this file to.
*/
tools?: Array<AssistantsAPI.CodeInterpreterTool | AssistantsAPI.FileSearchTool>;
tools?: Array<AssistantsAPI.CodeInterpreterTool | Attachment.FileSearch>;
}

export namespace Attachment {
export interface FileSearch {
/**
* The type of tool being defined: `file_search`
*/
type: 'file_search';
}
}
}

Expand Down
15 changes: 12 additions & 3 deletions src/resources/beta/threads/runs/runs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ export interface Run {

/**
* Whether to enable
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling)
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
* during tool use.
*/
parallel_tool_calls: boolean;
Expand Down Expand Up @@ -568,7 +568,7 @@ export interface RunCreateParamsBase {

/**
* Whether to enable
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling)
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
* during tool use.
*/
parallel_tool_calls?: boolean;
Expand Down Expand Up @@ -680,7 +680,16 @@ export namespace RunCreateParams {
/**
* The tools to add this file to.
*/
tools?: Array<AssistantsAPI.CodeInterpreterTool | AssistantsAPI.FileSearchTool>;
tools?: Array<AssistantsAPI.CodeInterpreterTool | Attachment.FileSearch>;
}

export namespace Attachment {
export interface FileSearch {
/**
* The type of tool being defined: `file_search`
*/
type: 'file_search';
}
}
}

Expand Down
24 changes: 21 additions & 3 deletions src/resources/beta/threads/threads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,16 @@ export namespace ThreadCreateParams {
/**
* The tools to add this file to.
*/
tools?: Array<AssistantsAPI.CodeInterpreterTool | AssistantsAPI.FileSearchTool>;
tools?: Array<AssistantsAPI.CodeInterpreterTool | Attachment.FileSearch>;
}

export namespace Attachment {
export interface FileSearch {
/**
* The type of tool being defined: `file_search`
*/
type: 'file_search';
}
}
}

Expand Down Expand Up @@ -538,7 +547,7 @@ export interface ThreadCreateAndRunParamsBase {

/**
* Whether to enable
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling)
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
* during tool use.
*/
parallel_tool_calls?: boolean;
Expand Down Expand Up @@ -693,7 +702,16 @@ export namespace ThreadCreateAndRunParams {
/**
* The tools to add this file to.
*/
tools?: Array<AssistantsAPI.CodeInterpreterTool | AssistantsAPI.FileSearchTool>;
tools?: Array<AssistantsAPI.CodeInterpreterTool | Attachment.FileSearch>;
}

export namespace Attachment {
export interface FileSearch {
/**
* The type of tool being defined: `file_search`
*/
type: 'file_search';
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/resources/chat/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ export interface ChatCompletionCreateParamsBase {

/**
* Whether to enable
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling)
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
* during tool use.
*/
parallel_tool_calls?: boolean;
Expand Down

0 comments on commit f932adc

Please sign in to comment.