@@ -1232,7 +1232,16 @@ export function toolDefinitionUnionArrayDeserializer(
12321232 } ) ;
12331233}
12341234
1235- /** Alias for AgentsApiResponseFormatOption */
1235+ /**
1236+ * Specifies the format that the model must output. Compatible with GPT-4 Turbo and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
1237+ *
1238+ * Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is valid JSON.
1239+ *
1240+ * **Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message.
1241+ * Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit,
1242+ * resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off
1243+ * if `finish_reason="length"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.
1244+ */
12361245export type AgentsApiResponseFormatOption =
12371246 | string
12381247 | AgentsApiResponseFormatMode
@@ -1469,7 +1478,7 @@ export function messageAttachmentToolDefinitionArrayDeserializer(
14691478 } ) ;
14701479}
14711480
1472- /** Alias for MessageAttachmentToolDefinition */
1481+ /** The possible tools to which files will be added by this message */
14731482export type MessageAttachmentToolDefinition =
14741483 | CodeInterpreterToolDefinition
14751484 | FileSearchToolDefinition ;
@@ -1990,7 +1999,13 @@ export function functionNameDeserializer(item: any): FunctionName {
19901999 } ;
19912000}
19922001
1993- /** Alias for AgentsApiToolChoiceOption */
2002+ /**
2003+ * Controls which (if any) tool is called by the model.
2004+ * - `none` means the model will not call any tools and instead generates a message.
2005+ * - `auto` is the default value and means the model can pick between generating a message or calling a tool.
2006+ * Specifying a particular tool like `{"type": "file_search"}` or `{"type": "function", "function": {"name": "my_function"}}`
2007+ * forces the model to call that tool.
2008+ */
19942009export type AgentsApiToolChoiceOption =
19952010 | string
19962011 | AgentsApiToolChoiceOptionMode
@@ -4510,7 +4525,24 @@ export function runStepDeltaCodeInterpreterImageOutputObjectDeserializer(
45104525 } ;
45114526}
45124527
4513- /** Alias for AgentStreamEvent */
4528+ /**
4529+ * Each event in a server-sent events stream has an `event` and `data` property:
4530+ *
4531+ * ```
4532+ * event: thread.created
4533+ * data: {"id": "thread_123", "object": "thread", ...}
4534+ * ```
4535+ *
4536+ * We emit events whenever a new object is created, transitions to a new state, or is being
4537+ * streamed in parts (deltas). For example, we emit `thread.run.created` when a new run
4538+ * is created, `thread.run.completed` when a run completes, and so on. When an Agent chooses
4539+ * to create a message during a run, we emit a `thread.message.created event`, a
4540+ * `thread.message.in_progress` event, many `thread.message.delta` events, and finally a
4541+ * `thread.message.completed` event.
4542+ *
4543+ * We may add additional events over time, so we recommend handling unknown events gracefully
4544+ * in your code.
4545+ */
45144546export type AgentStreamEvent =
45154547 | string
45164548 | ThreadStreamEvent
0 commit comments