You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`.
8843
+
enum: ["auto", "last_messages"]
8844
+
last_messages:
8845
+
type: integer
8846
+
description: The number of most recent messages from the thread when constructing the context for the run.
8847
+
minimum: 1
8848
+
nullable: true
8849
+
required:
8850
+
- strategy
8851
+
8852
+
AssistantsApiToolChoiceOption:
8853
+
description: |
8854
+
Controls which (if any) tool is called by the model.
8855
+
`none` means the model will not call any tools and instead generates a message.
8856
+
`auto` is the default value and means the model can pick between generating a message or calling a tool.
8857
+
Specifying a particular tool like `{"type": "TOOL_TYPE"}` or `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool.
8858
+
8859
+
oneOf:
8860
+
- type: string
8861
+
description: >
8862
+
`none` means the model will not call a function and instead generates a message.
8863
+
`auto` means the model can pick between generating a message or calling a function.
description: The type of the tool. If type is `function`, the function name must be set
8876
+
function:
8877
+
type: object
8878
+
properties:
8879
+
name:
8880
+
type: string
8881
+
description: The name of the function to call.
8882
+
required:
8883
+
- name
8884
+
required:
8885
+
- type
8886
+
8887
+
AssistantsApiResponseFormatOption:
8888
+
description: |
8889
+
Specifies the format that the model must output. Compatible with [GPT-4 Turbo](/docs/models/gpt-4-and-gpt-4-turbo) and all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.
8890
+
8891
+
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is valid JSON.
8892
+
8893
+
**Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if `finish_reason="length"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.
An object describing the expected output of the model. If `json_object` only `function` type `tools` are allowed to be passed to the Run. If `text` the model can return text or any value needed.
8906
+
properties:
8907
+
type:
8908
+
type: string
8909
+
enum: ["text", "json_object"]
8910
+
example: "json_object"
8911
+
default: "text"
8912
+
description: Must be one of `text` or `json_object`.
8913
+
8782
8914
RunObject:
8783
8915
type: object
8784
8916
title: A run on a thread
@@ -8872,6 +9004,15 @@ components:
8872
9004
description: The Unix timestamp (in seconds) for when the run was completed.
8873
9005
type: integer
8874
9006
nullable: true
9007
+
incomplete_details:
9008
+
description: Details on why the run is incomplete. Will be `null` if the run is not incomplete.
9009
+
type: object
9010
+
nullable: true
9011
+
properties:
9012
+
reason:
9013
+
description: The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run.
If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.
9215
+
max_prompt_tokens:
9216
+
type: integer
9217
+
nullable: true
9218
+
description: |
9219
+
The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `complete`. See `incomplete_details` for more info.
9220
+
minimum: 256
9221
+
max_completion_tokens:
9222
+
type: integer
9223
+
nullable: true
9224
+
description: |
9225
+
The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `complete`. See `incomplete_details` for more info.
If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.
9397
+
max_prompt_tokens:
9398
+
type: integer
9399
+
nullable: true
9400
+
description: |
9401
+
The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `complete`. See `incomplete_details` for more info.
9402
+
minimum: 256
9403
+
max_completion_tokens:
9404
+
type: integer
9405
+
nullable: true
9406
+
description: |
9407
+
The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.
0 commit comments