threads.d.ts 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044
  1. import { APIResource } from "../../../core/resource.js";
  2. import * as ThreadsAPI from "./threads.js";
  3. import * as Shared from "../../shared.js";
  4. import * as AssistantsAPI from "../assistants.js";
  5. import * as MessagesAPI from "./messages.js";
  6. import { Annotation, AnnotationDelta, FileCitationAnnotation, FileCitationDeltaAnnotation, FilePathAnnotation, FilePathDeltaAnnotation, ImageFile, ImageFileContentBlock, ImageFileDelta, ImageFileDeltaBlock, ImageURL, ImageURLContentBlock, ImageURLDelta, ImageURLDeltaBlock, Message as MessagesAPIMessage, MessageContent, MessageContentDelta, MessageContentPartParam, MessageCreateParams, MessageDeleteParams, MessageDeleted, MessageDelta, MessageDeltaEvent, MessageListParams, MessageRetrieveParams, MessageUpdateParams, Messages, MessagesPage, RefusalContentBlock, RefusalDeltaBlock, Text, TextContentBlock, TextContentBlockParam, TextDelta, TextDeltaBlock } from "./messages.js";
  7. import * as RunsAPI from "./runs/runs.js";
  8. import { RequiredActionFunctionToolCall, Run, RunCreateAndPollParams, RunCreateAndStreamParams, RunCancelParams, RunCreateParams, RunCreateParamsNonStreaming, RunCreateParamsStreaming, RunListParams, RunRetrieveParams, RunStatus, RunStreamParams, RunSubmitToolOutputsAndPollParams, RunSubmitToolOutputsParams, RunSubmitToolOutputsParamsNonStreaming, RunSubmitToolOutputsParamsStreaming, RunSubmitToolOutputsStreamParams, RunUpdateParams, Runs, RunsPage } from "./runs/runs.js";
  9. import { APIPromise } from "../../../core/api-promise.js";
  10. import { Stream } from "../../../core/streaming.js";
  11. import { RequestOptions } from "../../../internal/request-options.js";
  12. import { AssistantStream, ThreadCreateAndRunParamsBaseStream } from "../../../lib/AssistantStream.js";
  13. /**
  14. * @deprecated The Assistants API is deprecated in favor of the Responses API
  15. */
  16. export declare class Threads extends APIResource {
  17. runs: RunsAPI.Runs;
  18. messages: MessagesAPI.Messages;
  19. /**
  20. * Create a thread.
  21. *
  22. * @deprecated The Assistants API is deprecated in favor of the Responses API
  23. */
  24. create(body?: ThreadCreateParams | null | undefined, options?: RequestOptions): APIPromise<Thread>;
  25. /**
  26. * Retrieves a thread.
  27. *
  28. * @deprecated The Assistants API is deprecated in favor of the Responses API
  29. */
  30. retrieve(threadID: string, options?: RequestOptions): APIPromise<Thread>;
  31. /**
  32. * Modifies a thread.
  33. *
  34. * @deprecated The Assistants API is deprecated in favor of the Responses API
  35. */
  36. update(threadID: string, body: ThreadUpdateParams, options?: RequestOptions): APIPromise<Thread>;
  37. /**
  38. * Delete a thread.
  39. *
  40. * @deprecated The Assistants API is deprecated in favor of the Responses API
  41. */
  42. delete(threadID: string, options?: RequestOptions): APIPromise<ThreadDeleted>;
  43. /**
  44. * Create a thread and run it in one request.
  45. *
  46. * @deprecated The Assistants API is deprecated in favor of the Responses API
  47. */
  48. createAndRun(body: ThreadCreateAndRunParamsNonStreaming, options?: RequestOptions): APIPromise<RunsAPI.Run>;
  49. createAndRun(body: ThreadCreateAndRunParamsStreaming, options?: RequestOptions): APIPromise<Stream<AssistantsAPI.AssistantStreamEvent>>;
  50. createAndRun(body: ThreadCreateAndRunParamsBase, options?: RequestOptions): APIPromise<Stream<AssistantsAPI.AssistantStreamEvent> | RunsAPI.Run>;
  51. /**
  52. * A helper to create a thread, start a run and then poll for a terminal state.
  53. * More information on Run lifecycles can be found here:
  54. * https://platform.openai.com/docs/assistants/how-it-works/runs-and-run-steps
  55. */
  56. createAndRunPoll(body: ThreadCreateAndRunParamsNonStreaming, options?: RequestOptions & {
  57. pollIntervalMs?: number;
  58. }): Promise<Threads.Run>;
  59. /**
  60. * Create a thread and stream the run back
  61. */
  62. createAndRunStream(body: ThreadCreateAndRunParamsBaseStream, options?: RequestOptions): AssistantStream;
  63. }
  64. /**
  65. * Specifies the format that the model must output. Compatible with
  66. * [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
  67. * [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4),
  68. * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
  69. *
  70. * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
  71. * Outputs which ensures the model will match your supplied JSON schema. Learn more
  72. * in the
  73. * [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
  74. *
  75. * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
  76. * message the model generates is valid JSON.
  77. *
  78. * **Important:** when using JSON mode, you **must** also instruct the model to
  79. * produce JSON yourself via a system or user message. Without this, the model may
  80. * generate an unending stream of whitespace until the generation reaches the token
  81. * limit, resulting in a long-running and seemingly "stuck" request. Also note that
  82. * the message content may be partially cut off if `finish_reason="length"`, which
  83. * indicates the generation exceeded `max_tokens` or the conversation exceeded the
  84. * max context length.
  85. */
  86. export type AssistantResponseFormatOption = 'auto' | Shared.ResponseFormatText | Shared.ResponseFormatJSONObject | Shared.ResponseFormatJSONSchema;
  87. /**
  88. * Specifies a tool the model should use. Use to force the model to call a specific
  89. * tool.
  90. */
  91. export interface AssistantToolChoice {
  92. /**
  93. * The type of the tool. If type is `function`, the function name must be set
  94. */
  95. type: 'function' | 'code_interpreter' | 'file_search';
  96. function?: AssistantToolChoiceFunction;
  97. }
  98. export interface AssistantToolChoiceFunction {
  99. /**
  100. * The name of the function to call.
  101. */
  102. name: string;
  103. }
  104. /**
  105. * Controls which (if any) tool is called by the model. `none` means the model will
  106. * not call any tools and instead generates a message. `auto` is the default value
  107. * and means the model can pick between generating a message or calling one or more
  108. * tools. `required` means the model must call one or more tools before responding
  109. * to the user. Specifying a particular tool like `{"type": "file_search"}` or
  110. * `{"type": "function", "function": {"name": "my_function"}}` forces the model to
  111. * call that tool.
  112. */
  113. export type AssistantToolChoiceOption = 'none' | 'auto' | 'required' | AssistantToolChoice;
  114. /**
  115. * Represents a thread that contains
  116. * [messages](https://platform.openai.com/docs/api-reference/messages).
  117. */
  118. export interface Thread {
  119. /**
  120. * The identifier, which can be referenced in API endpoints.
  121. */
  122. id: string;
  123. /**
  124. * The Unix timestamp (in seconds) for when the thread was created.
  125. */
  126. created_at: number;
  127. /**
  128. * Set of 16 key-value pairs that can be attached to an object. This can be useful
  129. * for storing additional information about the object in a structured format, and
  130. * querying for objects via API or the dashboard.
  131. *
  132. * Keys are strings with a maximum length of 64 characters. Values are strings with
  133. * a maximum length of 512 characters.
  134. */
  135. metadata: Shared.Metadata | null;
  136. /**
  137. * The object type, which is always `thread`.
  138. */
  139. object: 'thread';
  140. /**
  141. * A set of resources that are made available to the assistant's tools in this
  142. * thread. The resources are specific to the type of tool. For example, the
  143. * `code_interpreter` tool requires a list of file IDs, while the `file_search`
  144. * tool requires a list of vector store IDs.
  145. */
  146. tool_resources: Thread.ToolResources | null;
  147. }
  148. export declare namespace Thread {
  149. /**
  150. * A set of resources that are made available to the assistant's tools in this
  151. * thread. The resources are specific to the type of tool. For example, the
  152. * `code_interpreter` tool requires a list of file IDs, while the `file_search`
  153. * tool requires a list of vector store IDs.
  154. */
  155. interface ToolResources {
  156. code_interpreter?: ToolResources.CodeInterpreter;
  157. file_search?: ToolResources.FileSearch;
  158. }
  159. namespace ToolResources {
  160. interface CodeInterpreter {
  161. /**
  162. * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made
  163. * available to the `code_interpreter` tool. There can be a maximum of 20 files
  164. * associated with the tool.
  165. */
  166. file_ids?: Array<string>;
  167. }
  168. interface FileSearch {
  169. /**
  170. * The
  171. * [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)
  172. * attached to this thread. There can be a maximum of 1 vector store attached to
  173. * the thread.
  174. */
  175. vector_store_ids?: Array<string>;
  176. }
  177. }
  178. }
  179. export interface ThreadDeleted {
  180. id: string;
  181. deleted: boolean;
  182. object: 'thread.deleted';
  183. }
  184. export interface ThreadCreateParams {
  185. /**
  186. * A list of [messages](https://platform.openai.com/docs/api-reference/messages) to
  187. * start the thread with.
  188. */
  189. messages?: Array<ThreadCreateParams.Message>;
  190. /**
  191. * Set of 16 key-value pairs that can be attached to an object. This can be useful
  192. * for storing additional information about the object in a structured format, and
  193. * querying for objects via API or the dashboard.
  194. *
  195. * Keys are strings with a maximum length of 64 characters. Values are strings with
  196. * a maximum length of 512 characters.
  197. */
  198. metadata?: Shared.Metadata | null;
  199. /**
  200. * A set of resources that are made available to the assistant's tools in this
  201. * thread. The resources are specific to the type of tool. For example, the
  202. * `code_interpreter` tool requires a list of file IDs, while the `file_search`
  203. * tool requires a list of vector store IDs.
  204. */
  205. tool_resources?: ThreadCreateParams.ToolResources | null;
  206. }
  207. export declare namespace ThreadCreateParams {
  208. interface Message {
  209. /**
  210. * The text contents of the message.
  211. */
  212. content: string | Array<MessagesAPI.MessageContentPartParam>;
  213. /**
  214. * The role of the entity that is creating the message. Allowed values include:
  215. *
  216. * - `user`: Indicates the message is sent by an actual user and should be used in
  217. * most cases to represent user-generated messages.
  218. * - `assistant`: Indicates the message is generated by the assistant. Use this
  219. * value to insert messages from the assistant into the conversation.
  220. */
  221. role: 'user' | 'assistant';
  222. /**
  223. * A list of files attached to the message, and the tools they should be added to.
  224. */
  225. attachments?: Array<Message.Attachment> | null;
  226. /**
  227. * Set of 16 key-value pairs that can be attached to an object. This can be useful
  228. * for storing additional information about the object in a structured format, and
  229. * querying for objects via API or the dashboard.
  230. *
  231. * Keys are strings with a maximum length of 64 characters. Values are strings with
  232. * a maximum length of 512 characters.
  233. */
  234. metadata?: Shared.Metadata | null;
  235. }
  236. namespace Message {
  237. interface Attachment {
  238. /**
  239. * The ID of the file to attach to the message.
  240. */
  241. file_id?: string;
  242. /**
  243. * The tools to add this file to.
  244. */
  245. tools?: Array<AssistantsAPI.CodeInterpreterTool | Attachment.FileSearch>;
  246. }
  247. namespace Attachment {
  248. interface FileSearch {
  249. /**
  250. * The type of tool being defined: `file_search`
  251. */
  252. type: 'file_search';
  253. }
  254. }
  255. }
  256. /**
  257. * A set of resources that are made available to the assistant's tools in this
  258. * thread. The resources are specific to the type of tool. For example, the
  259. * `code_interpreter` tool requires a list of file IDs, while the `file_search`
  260. * tool requires a list of vector store IDs.
  261. */
  262. interface ToolResources {
  263. code_interpreter?: ToolResources.CodeInterpreter;
  264. file_search?: ToolResources.FileSearch;
  265. }
  266. namespace ToolResources {
  267. interface CodeInterpreter {
  268. /**
  269. * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made
  270. * available to the `code_interpreter` tool. There can be a maximum of 20 files
  271. * associated with the tool.
  272. */
  273. file_ids?: Array<string>;
  274. }
  275. interface FileSearch {
  276. /**
  277. * The
  278. * [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)
  279. * attached to this thread. There can be a maximum of 1 vector store attached to
  280. * the thread.
  281. */
  282. vector_store_ids?: Array<string>;
  283. /**
  284. * A helper to create a
  285. * [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)
  286. * with file_ids and attach it to this thread. There can be a maximum of 1 vector
  287. * store attached to the thread.
  288. */
  289. vector_stores?: Array<FileSearch.VectorStore>;
  290. }
  291. namespace FileSearch {
  292. interface VectorStore {
  293. /**
  294. * The chunking strategy used to chunk the file(s). If not set, will use the `auto`
  295. * strategy.
  296. */
  297. chunking_strategy?: VectorStore.Auto | VectorStore.Static;
  298. /**
  299. * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to
  300. * add to the vector store. There can be a maximum of 10000 files in a vector
  301. * store.
  302. */
  303. file_ids?: Array<string>;
  304. /**
  305. * Set of 16 key-value pairs that can be attached to an object. This can be useful
  306. * for storing additional information about the object in a structured format, and
  307. * querying for objects via API or the dashboard.
  308. *
  309. * Keys are strings with a maximum length of 64 characters. Values are strings with
  310. * a maximum length of 512 characters.
  311. */
  312. metadata?: Shared.Metadata | null;
  313. }
  314. namespace VectorStore {
  315. /**
  316. * The default strategy. This strategy currently uses a `max_chunk_size_tokens` of
  317. * `800` and `chunk_overlap_tokens` of `400`.
  318. */
  319. interface Auto {
  320. /**
  321. * Always `auto`.
  322. */
  323. type: 'auto';
  324. }
  325. interface Static {
  326. static: Static.Static;
  327. /**
  328. * Always `static`.
  329. */
  330. type: 'static';
  331. }
  332. namespace Static {
  333. interface Static {
  334. /**
  335. * The number of tokens that overlap between chunks. The default value is `400`.
  336. *
  337. * Note that the overlap must not exceed half of `max_chunk_size_tokens`.
  338. */
  339. chunk_overlap_tokens: number;
  340. /**
  341. * The maximum number of tokens in each chunk. The default value is `800`. The
  342. * minimum value is `100` and the maximum value is `4096`.
  343. */
  344. max_chunk_size_tokens: number;
  345. }
  346. }
  347. }
  348. }
  349. }
  350. }
  351. export interface ThreadUpdateParams {
  352. /**
  353. * Set of 16 key-value pairs that can be attached to an object. This can be useful
  354. * for storing additional information about the object in a structured format, and
  355. * querying for objects via API or the dashboard.
  356. *
  357. * Keys are strings with a maximum length of 64 characters. Values are strings with
  358. * a maximum length of 512 characters.
  359. */
  360. metadata?: Shared.Metadata | null;
  361. /**
  362. * A set of resources that are made available to the assistant's tools in this
  363. * thread. The resources are specific to the type of tool. For example, the
  364. * `code_interpreter` tool requires a list of file IDs, while the `file_search`
  365. * tool requires a list of vector store IDs.
  366. */
  367. tool_resources?: ThreadUpdateParams.ToolResources | null;
  368. }
  369. export declare namespace ThreadUpdateParams {
  370. /**
  371. * A set of resources that are made available to the assistant's tools in this
  372. * thread. The resources are specific to the type of tool. For example, the
  373. * `code_interpreter` tool requires a list of file IDs, while the `file_search`
  374. * tool requires a list of vector store IDs.
  375. */
  376. interface ToolResources {
  377. code_interpreter?: ToolResources.CodeInterpreter;
  378. file_search?: ToolResources.FileSearch;
  379. }
  380. namespace ToolResources {
  381. interface CodeInterpreter {
  382. /**
  383. * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made
  384. * available to the `code_interpreter` tool. There can be a maximum of 20 files
  385. * associated with the tool.
  386. */
  387. file_ids?: Array<string>;
  388. }
  389. interface FileSearch {
  390. /**
  391. * The
  392. * [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)
  393. * attached to this thread. There can be a maximum of 1 vector store attached to
  394. * the thread.
  395. */
  396. vector_store_ids?: Array<string>;
  397. }
  398. }
  399. }
  400. export type ThreadCreateAndRunParams = ThreadCreateAndRunParamsNonStreaming | ThreadCreateAndRunParamsStreaming;
  401. export interface ThreadCreateAndRunParamsBase {
  402. /**
  403. * The ID of the
  404. * [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to
  405. * execute this run.
  406. */
  407. assistant_id: string;
  408. /**
  409. * Override the default system message of the assistant. This is useful for
  410. * modifying the behavior on a per-run basis.
  411. */
  412. instructions?: string | null;
  413. /**
  414. * The maximum number of completion tokens that may be used over the course of the
  415. * run. The run will make a best effort to use only the number of completion tokens
  416. * specified, across multiple turns of the run. If the run exceeds the number of
  417. * completion tokens specified, the run will end with status `incomplete`. See
  418. * `incomplete_details` for more info.
  419. */
  420. max_completion_tokens?: number | null;
  421. /**
  422. * The maximum number of prompt tokens that may be used over the course of the run.
  423. * The run will make a best effort to use only the number of prompt tokens
  424. * specified, across multiple turns of the run. If the run exceeds the number of
  425. * prompt tokens specified, the run will end with status `incomplete`. See
  426. * `incomplete_details` for more info.
  427. */
  428. max_prompt_tokens?: number | null;
  429. /**
  430. * Set of 16 key-value pairs that can be attached to an object. This can be useful
  431. * for storing additional information about the object in a structured format, and
  432. * querying for objects via API or the dashboard.
  433. *
  434. * Keys are strings with a maximum length of 64 characters. Values are strings with
  435. * a maximum length of 512 characters.
  436. */
  437. metadata?: Shared.Metadata | null;
  438. /**
  439. * The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to
  440. * be used to execute this run. If a value is provided here, it will override the
  441. * model associated with the assistant. If not, the model associated with the
  442. * assistant will be used.
  443. */
  444. model?: (string & {}) | Shared.ChatModel | null;
  445. /**
  446. * Whether to enable
  447. * [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling)
  448. * during tool use.
  449. */
  450. parallel_tool_calls?: boolean;
  451. /**
  452. * Specifies the format that the model must output. Compatible with
  453. * [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
  454. * [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4),
  455. * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
  456. *
  457. * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
  458. * Outputs which ensures the model will match your supplied JSON schema. Learn more
  459. * in the
  460. * [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
  461. *
  462. * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
  463. * message the model generates is valid JSON.
  464. *
  465. * **Important:** when using JSON mode, you **must** also instruct the model to
  466. * produce JSON yourself via a system or user message. Without this, the model may
  467. * generate an unending stream of whitespace until the generation reaches the token
  468. * limit, resulting in a long-running and seemingly "stuck" request. Also note that
  469. * the message content may be partially cut off if `finish_reason="length"`, which
  470. * indicates the generation exceeded `max_tokens` or the conversation exceeded the
  471. * max context length.
  472. */
  473. response_format?: AssistantResponseFormatOption | null;
  474. /**
  475. * If `true`, returns a stream of events that happen during the Run as server-sent
  476. * events, terminating when the Run enters a terminal state with a `data: [DONE]`
  477. * message.
  478. */
  479. stream?: boolean | null;
  480. /**
  481. * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
  482. * make the output more random, while lower values like 0.2 will make it more
  483. * focused and deterministic.
  484. */
  485. temperature?: number | null;
  486. /**
  487. * Options to create a new thread. If no thread is provided when running a request,
  488. * an empty thread will be created.
  489. */
  490. thread?: ThreadCreateAndRunParams.Thread;
  491. /**
  492. * Controls which (if any) tool is called by the model. `none` means the model will
  493. * not call any tools and instead generates a message. `auto` is the default value
  494. * and means the model can pick between generating a message or calling one or more
  495. * tools. `required` means the model must call one or more tools before responding
  496. * to the user. Specifying a particular tool like `{"type": "file_search"}` or
  497. * `{"type": "function", "function": {"name": "my_function"}}` forces the model to
  498. * call that tool.
  499. */
  500. tool_choice?: AssistantToolChoiceOption | null;
  501. /**
  502. * A set of resources that are used by the assistant's tools. The resources are
  503. * specific to the type of tool. For example, the `code_interpreter` tool requires
  504. * a list of file IDs, while the `file_search` tool requires a list of vector store
  505. * IDs.
  506. */
  507. tool_resources?: ThreadCreateAndRunParams.ToolResources | null;
  508. /**
  509. * Override the tools the assistant can use for this run. This is useful for
  510. * modifying the behavior on a per-run basis.
  511. */
  512. tools?: Array<AssistantsAPI.AssistantTool> | null;
  513. /**
  514. * An alternative to sampling with temperature, called nucleus sampling, where the
  515. * model considers the results of the tokens with top_p probability mass. So 0.1
  516. * means only the tokens comprising the top 10% probability mass are considered.
  517. *
  518. * We generally recommend altering this or temperature but not both.
  519. */
  520. top_p?: number | null;
  521. /**
  522. * Controls for how a thread will be truncated prior to the run. Use this to
  523. * control the initial context window of the run.
  524. */
  525. truncation_strategy?: ThreadCreateAndRunParams.TruncationStrategy | null;
  526. }
  527. export declare namespace ThreadCreateAndRunParams {
  528. /**
  529. * Options to create a new thread. If no thread is provided when running a request,
  530. * an empty thread will be created.
  531. */
  532. interface Thread {
  533. /**
  534. * A list of [messages](https://platform.openai.com/docs/api-reference/messages) to
  535. * start the thread with.
  536. */
  537. messages?: Array<Thread.Message>;
  538. /**
  539. * Set of 16 key-value pairs that can be attached to an object. This can be useful
  540. * for storing additional information about the object in a structured format, and
  541. * querying for objects via API or the dashboard.
  542. *
  543. * Keys are strings with a maximum length of 64 characters. Values are strings with
  544. * a maximum length of 512 characters.
  545. */
  546. metadata?: Shared.Metadata | null;
  547. /**
  548. * A set of resources that are made available to the assistant's tools in this
  549. * thread. The resources are specific to the type of tool. For example, the
  550. * `code_interpreter` tool requires a list of file IDs, while the `file_search`
  551. * tool requires a list of vector store IDs.
  552. */
  553. tool_resources?: Thread.ToolResources | null;
  554. }
  555. namespace Thread {
  556. interface Message {
  557. /**
  558. * The text contents of the message.
  559. */
  560. content: string | Array<MessagesAPI.MessageContentPartParam>;
  561. /**
  562. * The role of the entity that is creating the message. Allowed values include:
  563. *
  564. * - `user`: Indicates the message is sent by an actual user and should be used in
  565. * most cases to represent user-generated messages.
  566. * - `assistant`: Indicates the message is generated by the assistant. Use this
  567. * value to insert messages from the assistant into the conversation.
  568. */
  569. role: 'user' | 'assistant';
  570. /**
  571. * A list of files attached to the message, and the tools they should be added to.
  572. */
  573. attachments?: Array<Message.Attachment> | null;
  574. /**
  575. * Set of 16 key-value pairs that can be attached to an object. This can be useful
  576. * for storing additional information about the object in a structured format, and
  577. * querying for objects via API or the dashboard.
  578. *
  579. * Keys are strings with a maximum length of 64 characters. Values are strings with
  580. * a maximum length of 512 characters.
  581. */
  582. metadata?: Shared.Metadata | null;
  583. }
  584. namespace Message {
  585. interface Attachment {
  586. /**
  587. * The ID of the file to attach to the message.
  588. */
  589. file_id?: string;
  590. /**
  591. * The tools to add this file to.
  592. */
  593. tools?: Array<AssistantsAPI.CodeInterpreterTool | Attachment.FileSearch>;
  594. }
  595. namespace Attachment {
  596. interface FileSearch {
  597. /**
  598. * The type of tool being defined: `file_search`
  599. */
  600. type: 'file_search';
  601. }
  602. }
  603. }
  604. /**
  605. * A set of resources that are made available to the assistant's tools in this
  606. * thread. The resources are specific to the type of tool. For example, the
  607. * `code_interpreter` tool requires a list of file IDs, while the `file_search`
  608. * tool requires a list of vector store IDs.
  609. */
  610. interface ToolResources {
  611. code_interpreter?: ToolResources.CodeInterpreter;
  612. file_search?: ToolResources.FileSearch;
  613. }
  614. namespace ToolResources {
  615. interface CodeInterpreter {
  616. /**
  617. * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made
  618. * available to the `code_interpreter` tool. There can be a maximum of 20 files
  619. * associated with the tool.
  620. */
  621. file_ids?: Array<string>;
  622. }
  623. interface FileSearch {
  624. /**
  625. * The
  626. * [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)
  627. * attached to this thread. There can be a maximum of 1 vector store attached to
  628. * the thread.
  629. */
  630. vector_store_ids?: Array<string>;
  631. /**
  632. * A helper to create a
  633. * [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)
  634. * with file_ids and attach it to this thread. There can be a maximum of 1 vector
  635. * store attached to the thread.
  636. */
  637. vector_stores?: Array<FileSearch.VectorStore>;
  638. }
  639. namespace FileSearch {
  640. interface VectorStore {
  641. /**
  642. * The chunking strategy used to chunk the file(s). If not set, will use the `auto`
  643. * strategy.
  644. */
  645. chunking_strategy?: VectorStore.Auto | VectorStore.Static;
  646. /**
  647. * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to
  648. * add to the vector store. There can be a maximum of 10000 files in a vector
  649. * store.
  650. */
  651. file_ids?: Array<string>;
  652. /**
  653. * Set of 16 key-value pairs that can be attached to an object. This can be useful
  654. * for storing additional information about the object in a structured format, and
  655. * querying for objects via API or the dashboard.
  656. *
  657. * Keys are strings with a maximum length of 64 characters. Values are strings with
  658. * a maximum length of 512 characters.
  659. */
  660. metadata?: Shared.Metadata | null;
  661. }
  662. namespace VectorStore {
  663. /**
  664. * The default strategy. This strategy currently uses a `max_chunk_size_tokens` of
  665. * `800` and `chunk_overlap_tokens` of `400`.
  666. */
  667. interface Auto {
  668. /**
  669. * Always `auto`.
  670. */
  671. type: 'auto';
  672. }
  673. interface Static {
  674. static: Static.Static;
  675. /**
  676. * Always `static`.
  677. */
  678. type: 'static';
  679. }
  680. namespace Static {
  681. interface Static {
  682. /**
  683. * The number of tokens that overlap between chunks. The default value is `400`.
  684. *
  685. * Note that the overlap must not exceed half of `max_chunk_size_tokens`.
  686. */
  687. chunk_overlap_tokens: number;
  688. /**
  689. * The maximum number of tokens in each chunk. The default value is `800`. The
  690. * minimum value is `100` and the maximum value is `4096`.
  691. */
  692. max_chunk_size_tokens: number;
  693. }
  694. }
  695. }
  696. }
  697. }
  698. }
  699. /**
  700. * A set of resources that are used by the assistant's tools. The resources are
  701. * specific to the type of tool. For example, the `code_interpreter` tool requires
  702. * a list of file IDs, while the `file_search` tool requires a list of vector store
  703. * IDs.
  704. */
  705. interface ToolResources {
  706. code_interpreter?: ToolResources.CodeInterpreter;
  707. file_search?: ToolResources.FileSearch;
  708. }
  709. namespace ToolResources {
  710. interface CodeInterpreter {
  711. /**
  712. * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made
  713. * available to the `code_interpreter` tool. There can be a maximum of 20 files
  714. * associated with the tool.
  715. */
  716. file_ids?: Array<string>;
  717. }
  718. interface FileSearch {
  719. /**
  720. * The ID of the
  721. * [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)
  722. * attached to this assistant. There can be a maximum of 1 vector store attached to
  723. * the assistant.
  724. */
  725. vector_store_ids?: Array<string>;
  726. }
  727. }
  728. /**
  729. * Controls for how a thread will be truncated prior to the run. Use this to
  730. * control the initial context window of the run.
  731. */
  732. interface TruncationStrategy {
  733. /**
  734. * The truncation strategy to use for the thread. The default is `auto`. If set to
  735. * `last_messages`, the thread will be truncated to the n most recent messages in
  736. * the thread. When set to `auto`, messages in the middle of the thread will be
  737. * dropped to fit the context length of the model, `max_prompt_tokens`.
  738. */
  739. type: 'auto' | 'last_messages';
  740. /**
  741. * The number of most recent messages from the thread when constructing the context
  742. * for the run.
  743. */
  744. last_messages?: number | null;
  745. }
  746. type ThreadCreateAndRunParamsNonStreaming = ThreadsAPI.ThreadCreateAndRunParamsNonStreaming;
  747. type ThreadCreateAndRunParamsStreaming = ThreadsAPI.ThreadCreateAndRunParamsStreaming;
  748. }
  749. export interface ThreadCreateAndRunParamsNonStreaming extends ThreadCreateAndRunParamsBase {
  750. /**
  751. * If `true`, returns a stream of events that happen during the Run as server-sent
  752. * events, terminating when the Run enters a terminal state with a `data: [DONE]`
  753. * message.
  754. */
  755. stream?: false | null;
  756. }
  757. export interface ThreadCreateAndRunParamsStreaming extends ThreadCreateAndRunParamsBase {
  758. /**
  759. * If `true`, returns a stream of events that happen during the Run as server-sent
  760. * events, terminating when the Run enters a terminal state with a `data: [DONE]`
  761. * message.
  762. */
  763. stream: true;
  764. }
  765. export interface ThreadCreateAndRunPollParams {
  766. /**
  767. * The ID of the
  768. * [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to
  769. * execute this run.
  770. */
  771. assistant_id: string;
  772. /**
  773. * Override the default system message of the assistant. This is useful for
  774. * modifying the behavior on a per-run basis.
  775. */
  776. instructions?: string | null;
  777. /**
  778. * The maximum number of completion tokens that may be used over the course of the
  779. * run. The run will make a best effort to use only the number of completion tokens
  780. * specified, across multiple turns of the run. If the run exceeds the number of
  781. * completion tokens specified, the run will end with status `incomplete`. See
  782. * `incomplete_details` for more info.
  783. */
  784. max_completion_tokens?: number | null;
  785. /**
  786. * The maximum number of prompt tokens that may be used over the course of the run.
  787. * The run will make a best effort to use only the number of prompt tokens
  788. * specified, across multiple turns of the run. If the run exceeds the number of
  789. * prompt tokens specified, the run will end with status `incomplete`. See
  790. * `incomplete_details` for more info.
  791. */
  792. max_prompt_tokens?: number | null;
  793. /**
  794. * Set of 16 key-value pairs that can be attached to an object. This can be useful
  795. * for storing additional information about the object in a structured format. Keys
  796. * can be a maximum of 64 characters long and values can be a maxium of 512
  797. * characters long.
  798. */
  799. metadata?: unknown | null;
  800. /**
  801. * The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to
  802. * be used to execute this run. If a value is provided here, it will override the
  803. * model associated with the assistant. If not, the model associated with the
  804. * assistant will be used.
  805. */
  806. model?: (string & {}) | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-0125-preview' | 'gpt-4-turbo-preview' | 'gpt-4-1106-preview' | 'gpt-4-vision-preview' | 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-16k-0613' | null;
  807. /**
  808. * Specifies the format that the model must output. Compatible with
  809. * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
  810. * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
  811. * and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
  812. *
  813. * Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
  814. * message the model generates is valid JSON.
  815. *
  816. * **Important:** when using JSON mode, you **must** also instruct the model to
  817. * produce JSON yourself via a system or user message. Without this, the model may
  818. * generate an unending stream of whitespace until the generation reaches the token
  819. * limit, resulting in a long-running and seemingly "stuck" request. Also note that
  820. * the message content may be partially cut off if `finish_reason="length"`, which
  821. * indicates the generation exceeded `max_tokens` or the conversation exceeded the
  822. * max context length.
  823. */
  824. response_format?: AssistantResponseFormatOption | null;
  825. /**
  826. * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
  827. * make the output more random, while lower values like 0.2 will make it more
  828. * focused and deterministic.
  829. */
  830. temperature?: number | null;
  831. /**
  832. * If no thread is provided, an empty thread will be created.
  833. */
  834. thread?: ThreadCreateAndRunPollParams.Thread;
  835. /**
  836. * Controls which (if any) tool is called by the model. `none` means the model will
  837. * not call any tools and instead generates a message. `auto` is the default value
  838. * and means the model can pick between generating a message or calling one or more
  839. * tools. `required` means the model must call one or more tools before responding
  840. * to the user. Specifying a particular tool like `{"type": "file_search"}` or
  841. * `{"type": "function", "function": {"name": "my_function"}}` forces the model to
  842. * call that tool.
  843. */
  844. tool_choice?: AssistantToolChoiceOption | null;
  845. /**
  846. * A set of resources that are used by the assistant's tools. The resources are
  847. * specific to the type of tool. For example, the `code_interpreter` tool requires
  848. * a list of file IDs, while the `file_search` tool requires a list of vector store
  849. * IDs.
  850. */
  851. tool_resources?: ThreadCreateAndRunPollParams.ToolResources | null;
  852. /**
  853. * Override the tools the assistant can use for this run. This is useful for
  854. * modifying the behavior on a per-run basis.
  855. */
  856. tools?: Array<AssistantsAPI.CodeInterpreterTool | AssistantsAPI.FileSearchTool | AssistantsAPI.FunctionTool> | null;
  857. /**
  858. * An alternative to sampling with temperature, called nucleus sampling, where the
  859. * model considers the results of the tokens with top_p probability mass. So 0.1
  860. * means only the tokens comprising the top 10% probability mass are considered.
  861. *
  862. * We generally recommend altering this or temperature but not both.
  863. */
  864. top_p?: number | null;
  865. /**
  866. * Controls for how a thread will be truncated prior to the run. Use this to
  867. * control the intial context window of the run.
  868. */
  869. truncation_strategy?: ThreadCreateAndRunPollParams.TruncationStrategy | null;
  870. }
  871. export declare namespace ThreadCreateAndRunPollParams {
  872. /**
  873. * If no thread is provided, an empty thread will be created.
  874. */
  875. interface Thread {
  876. /**
  877. * A list of [messages](https://platform.openai.com/docs/api-reference/messages) to
  878. * start the thread with.
  879. */
  880. messages?: Array<Thread.Message>;
  881. /**
  882. * Set of 16 key-value pairs that can be attached to an object. This can be useful
  883. * for storing additional information about the object in a structured format. Keys
  884. * can be a maximum of 64 characters long and values can be a maxium of 512
  885. * characters long.
  886. */
  887. metadata?: unknown | null;
  888. /**
  889. * A set of resources that are made available to the assistant's tools in this
  890. * thread. The resources are specific to the type of tool. For example, the
  891. * `code_interpreter` tool requires a list of file IDs, while the `file_search`
  892. * tool requires a list of vector store IDs.
  893. */
  894. tool_resources?: Thread.ToolResources | null;
  895. }
  896. namespace Thread {
  897. interface Message {
  898. /**
  899. * The text contents of the message.
  900. */
  901. content: string | Array<MessagesAPI.MessageContentPartParam>;
  902. /**
  903. * The role of the entity that is creating the message. Allowed values include:
  904. *
  905. * - `user`: Indicates the message is sent by an actual user and should be used in
  906. * most cases to represent user-generated messages.
  907. * - `assistant`: Indicates the message is generated by the assistant. Use this
  908. * value to insert messages from the assistant into the conversation.
  909. */
  910. role: 'user' | 'assistant';
  911. /**
  912. * A list of files attached to the message, and the tools they should be added to.
  913. */
  914. attachments?: Array<Message.Attachment> | null;
  915. /**
  916. * Set of 16 key-value pairs that can be attached to an object. This can be useful
  917. * for storing additional information about the object in a structured format. Keys
  918. * can be a maximum of 64 characters long and values can be a maxium of 512
  919. * characters long.
  920. */
  921. metadata?: unknown | null;
  922. }
  923. namespace Message {
  924. interface Attachment {
  925. /**
  926. * The ID of the file to attach to the message.
  927. */
  928. file_id?: string;
  929. /**
  930. * The tools to add this file to.
  931. */
  932. tools?: Array<AssistantsAPI.CodeInterpreterTool | AssistantsAPI.FileSearchTool>;
  933. }
  934. }
  935. /**
  936. * A set of resources that are made available to the assistant's tools in this
  937. * thread. The resources are specific to the type of tool. For example, the
  938. * `code_interpreter` tool requires a list of file IDs, while the `file_search`
  939. * tool requires a list of vector store IDs.
  940. */
  941. interface ToolResources {
  942. code_interpreter?: ToolResources.CodeInterpreter;
  943. file_search?: ToolResources.FileSearch;
  944. }
  945. namespace ToolResources {
  946. interface CodeInterpreter {
  947. /**
  948. * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made
  949. * available to the `code_interpreter` tool. There can be a maximum of 20 files
  950. * associated with the tool.
  951. */
  952. file_ids?: Array<string>;
  953. }
  954. interface FileSearch {
  955. /**
  956. * The
  957. * [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)
  958. * attached to this thread. There can be a maximum of 1 vector store attached to
  959. * the thread.
  960. */
  961. vector_store_ids?: Array<string>;
  962. /**
  963. * A helper to create a
  964. * [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)
  965. * with file_ids and attach it to this thread. There can be a maximum of 1 vector
  966. * store attached to the thread.
  967. */
  968. vector_stores?: Array<FileSearch.VectorStore>;
  969. }
  970. namespace FileSearch {
  971. interface VectorStore {
  972. /**
  973. * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to
  974. * add to the vector store. There can be a maximum of 10000 files in a vector
  975. * store.
  976. */
  977. file_ids?: Array<string>;
  978. /**
  979. * Set of 16 key-value pairs that can be attached to a vector store. This can be
  980. * useful for storing additional information about the vector store in a structured
  981. * format. Keys can be a maximum of 64 characters long and values can be a maxium
  982. * of 512 characters long.
  983. */
  984. metadata?: unknown;
  985. }
  986. }
  987. }
  988. }
  989. /**
  990. * A set of resources that are used by the assistant's tools. The resources are
  991. * specific to the type of tool. For example, the `code_interpreter` tool requires
  992. * a list of file IDs, while the `file_search` tool requires a list of vector store
  993. * IDs.
  994. */
  995. interface ToolResources {
  996. code_interpreter?: ToolResources.CodeInterpreter;
  997. file_search?: ToolResources.FileSearch;
  998. }
  999. namespace ToolResources {
  1000. interface CodeInterpreter {
  1001. /**
  1002. * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made
  1003. * available to the `code_interpreter` tool. There can be a maximum of 20 files
  1004. * associated with the tool.
  1005. */
  1006. file_ids?: Array<string>;
  1007. }
  1008. interface FileSearch {
  1009. /**
  1010. * The ID of the
  1011. * [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)
  1012. * attached to this assistant. There can be a maximum of 1 vector store attached to
  1013. * the assistant.
  1014. */
  1015. vector_store_ids?: Array<string>;
  1016. }
  1017. }
  1018. /**
  1019. * Controls for how a thread will be truncated prior to the run. Use this to
  1020. * control the intial context window of the run.
  1021. */
  1022. interface TruncationStrategy {
  1023. /**
  1024. * The truncation strategy to use for the thread. The default is `auto`. If set to
  1025. * `last_messages`, the thread will be truncated to the n most recent messages in
  1026. * the thread. When set to `auto`, messages in the middle of the thread will be
  1027. * dropped to fit the context length of the model, `max_prompt_tokens`.
  1028. */
  1029. type: 'auto' | 'last_messages';
  1030. /**
  1031. * The number of most recent messages from the thread when constructing the context
  1032. * for the run.
  1033. */
  1034. last_messages?: number | null;
  1035. }
  1036. }
  1037. export type ThreadCreateAndRunStreamParams = ThreadCreateAndRunParamsBaseStream;
  1038. export declare namespace Threads {
  1039. export { type AssistantResponseFormatOption as AssistantResponseFormatOption, type AssistantToolChoice as AssistantToolChoice, type AssistantToolChoiceFunction as AssistantToolChoiceFunction, type AssistantToolChoiceOption as AssistantToolChoiceOption, type Thread as Thread, type ThreadDeleted as ThreadDeleted, type ThreadCreateParams as ThreadCreateParams, type ThreadUpdateParams as ThreadUpdateParams, type ThreadCreateAndRunParams as ThreadCreateAndRunParams, type ThreadCreateAndRunParamsNonStreaming as ThreadCreateAndRunParamsNonStreaming, type ThreadCreateAndRunParamsStreaming as ThreadCreateAndRunParamsStreaming, type ThreadCreateAndRunPollParams, type ThreadCreateAndRunStreamParams, };
  1040. export { Runs as Runs, type RequiredActionFunctionToolCall as RequiredActionFunctionToolCall, type Run as Run, type RunStatus as RunStatus, type RunsPage as RunsPage, type RunCreateParams as RunCreateParams, type RunCreateParamsNonStreaming as RunCreateParamsNonStreaming, type RunCreateParamsStreaming as RunCreateParamsStreaming, type RunRetrieveParams as RunRetrieveParams, type RunUpdateParams as RunUpdateParams, type RunListParams as RunListParams, type RunCancelParams as RunCancelParams, type RunCreateAndPollParams, type RunCreateAndStreamParams, type RunStreamParams, type RunSubmitToolOutputsParams as RunSubmitToolOutputsParams, type RunSubmitToolOutputsParamsNonStreaming as RunSubmitToolOutputsParamsNonStreaming, type RunSubmitToolOutputsParamsStreaming as RunSubmitToolOutputsParamsStreaming, type RunSubmitToolOutputsAndPollParams, type RunSubmitToolOutputsStreamParams, };
  1041. export { Messages as Messages, type Annotation as Annotation, type AnnotationDelta as AnnotationDelta, type FileCitationAnnotation as FileCitationAnnotation, type FileCitationDeltaAnnotation as FileCitationDeltaAnnotation, type FilePathAnnotation as FilePathAnnotation, type FilePathDeltaAnnotation as FilePathDeltaAnnotation, type ImageFile as ImageFile, type ImageFileContentBlock as ImageFileContentBlock, type ImageFileDelta as ImageFileDelta, type ImageFileDeltaBlock as ImageFileDeltaBlock, type ImageURL as ImageURL, type ImageURLContentBlock as ImageURLContentBlock, type ImageURLDelta as ImageURLDelta, type ImageURLDeltaBlock as ImageURLDeltaBlock, type MessagesAPIMessage as Message, type MessageContent as MessageContent, type MessageContentDelta as MessageContentDelta, type MessageContentPartParam as MessageContentPartParam, type MessageDeleted as MessageDeleted, type MessageDelta as MessageDelta, type MessageDeltaEvent as MessageDeltaEvent, type RefusalContentBlock as RefusalContentBlock, type RefusalDeltaBlock as RefusalDeltaBlock, type Text as Text, type TextContentBlock as TextContentBlock, type TextContentBlockParam as TextContentBlockParam, type TextDelta as TextDelta, type TextDeltaBlock as TextDeltaBlock, type MessagesPage as MessagesPage, type MessageCreateParams as MessageCreateParams, type MessageRetrieveParams as MessageRetrieveParams, type MessageUpdateParams as MessageUpdateParams, type MessageListParams as MessageListParams, type MessageDeleteParams as MessageDeleteParams, };
  1042. export { AssistantStream };
  1043. }
  1044. //# sourceMappingURL=threads.d.ts.map