|
2 | 2 |
|
3 | 3 | from __future__ import annotations |
4 | 4 |
|
5 | | -from typing import List, Union, Iterable, Optional |
| 5 | +from typing import Union, Iterable, Optional |
6 | 6 | from typing_extensions import Literal, Required, TypedDict |
7 | 7 |
|
8 | 8 | from ..assistant_tool_param import AssistantToolParam |
| 9 | +from ..file_search_tool_param import FileSearchToolParam |
| 10 | +from ..code_interpreter_tool_param import CodeInterpreterToolParam |
9 | 11 | from ..assistant_tool_choice_option_param import AssistantToolChoiceOptionParam |
10 | 12 | from ..assistant_response_format_option_param import AssistantResponseFormatOptionParam |
11 | 13 |
|
12 | 14 | __all__ = [ |
13 | 15 | "RunCreateParamsBase", |
14 | 16 | "AdditionalMessage", |
15 | 17 | "AdditionalMessageAttachment", |
| 18 | + "AdditionalMessageAttachmentTool", |
16 | 19 | "TruncationStrategy", |
17 | 20 | "RunCreateParamsNonStreaming", |
18 | 21 | "RunCreateParamsStreaming", |
@@ -159,11 +162,15 @@ class RunCreateParamsBase(TypedDict, total=False): |
159 | 162 | """ |
160 | 163 |
|
161 | 164 |
|
| 165 | +AdditionalMessageAttachmentTool = Union[CodeInterpreterToolParam, FileSearchToolParam] |
| 166 | + |
| 167 | + |
162 | 168 | class AdditionalMessageAttachment(TypedDict, total=False): |
163 | 169 | file_id: str |
164 | 170 | """The ID of the file to attach to the message.""" |
165 | 171 |
|
166 | | - tools: List[Literal["file_search", "code_interpreter"]] |
| 172 | + tools: Iterable[AdditionalMessageAttachmentTool] |
| 173 | + """The tools to add this file to.""" |
167 | 174 |
|
168 | 175 |
|
169 | 176 | class AdditionalMessage(TypedDict, total=False): |
|
0 commit comments