Skip to content

Commit a9f898e

Browse files
committed
fix: remove erroneous thread create argument (#889)
1 parent 24de50b commit a9f898e

File tree

5 files changed

+55
-10
lines changed

5 files changed

+55
-10
lines changed

.stats.yml

+1-1
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-ff436357b12348b7c1c930469332a79cd23ac6ec537e645c411893c42de42e57.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-c085faf70d6ff059fbe11b7b6b98123a612524cb9b8a6f649c99526e5b0b1bdb.yml

src/resources/beta/threads/messages.ts

+20-2
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,16 @@ export namespace Message {
459459
/**
460460
* The tools to add this file to.
461461
*/
462-
tools?: Array<AssistantsAPI.CodeInterpreterTool | AssistantsAPI.FileSearchTool>;
462+
tools?: Array<AssistantsAPI.CodeInterpreterTool | Attachment.AssistantToolsFileSearchTypeOnly>;
463+
}
464+
465+
export namespace Attachment {
466+
export interface AssistantToolsFileSearchTypeOnly {
467+
/**
468+
* The type of tool being defined: `file_search`
469+
*/
470+
type: 'file_search';
471+
}
463472
}
464473

465474
/**
@@ -637,7 +646,16 @@ export namespace MessageCreateParams {
637646
/**
638647
* The tools to add this file to.
639648
*/
640-
tools?: Array<AssistantsAPI.CodeInterpreterTool | AssistantsAPI.FileSearchTool>;
649+
tools?: Array<AssistantsAPI.CodeInterpreterTool | Attachment.FileSearch>;
650+
}
651+
652+
export namespace Attachment {
653+
export interface FileSearch {
654+
/**
655+
* The type of tool being defined: `file_search`
656+
*/
657+
type: 'file_search';
658+
}
641659
}
642660
}
643661

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

+12-3
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ export interface Run {
404404

405405
/**
406406
* Whether to enable
407-
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling)
407+
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
408408
* during tool use.
409409
*/
410410
parallel_tool_calls: boolean;
@@ -694,7 +694,7 @@ export interface RunCreateParamsBase {
694694

695695
/**
696696
* Whether to enable
697-
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling)
697+
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
698698
* during tool use.
699699
*/
700700
parallel_tool_calls?: boolean;
@@ -806,7 +806,16 @@ export namespace RunCreateParams {
806806
/**
807807
* The tools to add this file to.
808808
*/
809-
tools?: Array<AssistantsAPI.CodeInterpreterTool | AssistantsAPI.FileSearchTool>;
809+
tools?: Array<AssistantsAPI.CodeInterpreterTool | Attachment.FileSearch>;
810+
}
811+
812+
export namespace Attachment {
813+
export interface FileSearch {
814+
/**
815+
* The type of tool being defined: `file_search`
816+
*/
817+
type: 'file_search';
818+
}
810819
}
811820
}
812821

src/resources/beta/threads/threads.ts

+21-3
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,16 @@ export namespace ThreadCreateParams {
323323
/**
324324
* The tools to add this file to.
325325
*/
326-
tools?: Array<AssistantsAPI.CodeInterpreterTool | AssistantsAPI.FileSearchTool>;
326+
tools?: Array<AssistantsAPI.CodeInterpreterTool | Attachment.FileSearch>;
327+
}
328+
329+
export namespace Attachment {
330+
export interface FileSearch {
331+
/**
332+
* The type of tool being defined: `file_search`
333+
*/
334+
type: 'file_search';
335+
}
327336
}
328337
}
329338

@@ -562,7 +571,7 @@ export interface ThreadCreateAndRunParamsBase {
562571

563572
/**
564573
* Whether to enable
565-
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling)
574+
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
566575
* during tool use.
567576
*/
568577
parallel_tool_calls?: boolean;
@@ -717,7 +726,16 @@ export namespace ThreadCreateAndRunParams {
717726
/**
718727
* The tools to add this file to.
719728
*/
720-
tools?: Array<AssistantsAPI.CodeInterpreterTool | AssistantsAPI.FileSearchTool>;
729+
tools?: Array<AssistantsAPI.CodeInterpreterTool | Attachment.FileSearch>;
730+
}
731+
732+
export namespace Attachment {
733+
export interface FileSearch {
734+
/**
735+
* The type of tool being defined: `file_search`
736+
*/
737+
type: 'file_search';
738+
}
721739
}
722740
}
723741

src/resources/chat/completions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ export interface ChatCompletionCreateParamsBase {
759759

760760
/**
761761
* Whether to enable
762-
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling)
762+
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
763763
* during tool use.
764764
*/
765765
parallel_tool_calls?: boolean;

0 commit comments

Comments
 (0)