From 3bf3ead642146afe0a773fc77579e2413c7d9041 Mon Sep 17 00:00:00 2001 From: liumin01 Date: Mon, 8 Jul 2024 20:28:29 +0800 Subject: [PATCH 1/3] tool resource support function --- src/openai/types/beta/assistant_create_params.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/openai/types/beta/assistant_create_params.py b/src/openai/types/beta/assistant_create_params.py index c9b0317831..73acf69509 100644 --- a/src/openai/types/beta/assistant_create_params.py +++ b/src/openai/types/beta/assistant_create_params.py @@ -211,7 +211,22 @@ class ToolResourcesFileSearch(TypedDict, total=False): """ +class ToolResourceFunction(TypedDict, total=False): + name: str + """ + Function name. + """ + file_ids: List[str] + """ + A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made + available to the `code_interpreter` tool. There can be a maximum of 20 files + associated with the tool. + """ + + class ToolResources(TypedDict, total=False): code_interpreter: ToolResourcesCodeInterpreter file_search: ToolResourcesFileSearch + + function: ToolResourceFunction From 53f04b0470a1d71acebac9876619e1d26bfbdb66 Mon Sep 17 00:00:00 2001 From: liumin01 Date: Tue, 9 Jul 2024 10:57:30 +0800 Subject: [PATCH 2/3] tool resource support function --- src/openai/types/beta/assistant_create_params.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/openai/types/beta/assistant_create_params.py b/src/openai/types/beta/assistant_create_params.py index 73acf69509..e507e240f6 100644 --- a/src/openai/types/beta/assistant_create_params.py +++ b/src/openai/types/beta/assistant_create_params.py @@ -211,11 +211,12 @@ class ToolResourcesFileSearch(TypedDict, total=False): """ -class ToolResourceFunction(TypedDict, total=False): +class ToolResourcesFunction(TypedDict, total=False): name: str """ Function name. """ + file_ids: List[str] """ A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made @@ -229,4 +230,4 @@ class ToolResources(TypedDict, total=False): file_search: ToolResourcesFileSearch - function: ToolResourceFunction + function: ToolResourcesFunction From db48a20dcac4ead1e77fa0d7bd3b4c4809024fd0 Mon Sep 17 00:00:00 2001 From: liumin01 Date: Tue, 9 Jul 2024 17:49:53 +0800 Subject: [PATCH 3/3] tool resource support function --- src/openai/types/beta/assistant_create_params.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openai/types/beta/assistant_create_params.py b/src/openai/types/beta/assistant_create_params.py index e507e240f6..145ebe3cdb 100644 --- a/src/openai/types/beta/assistant_create_params.py +++ b/src/openai/types/beta/assistant_create_params.py @@ -230,4 +230,4 @@ class ToolResources(TypedDict, total=False): file_search: ToolResourcesFileSearch - function: ToolResourcesFunction + function: List[ToolResourcesFunction]