pub struct RunObject {Show 27 fields
pub id: String,
pub object: String,
pub created_at: i32,
pub thread_id: String,
pub assistant_id: Option<String>,
pub status: RunStatus,
pub required_action: Option<RequiredAction>,
pub last_error: Option<LastError>,
pub expires_at: Option<i32>,
pub started_at: Option<i32>,
pub cancelled_at: Option<i32>,
pub failed_at: Option<i32>,
pub completed_at: Option<i32>,
pub incomplete_details: Option<RunObjectIncompleteDetails>,
pub model: String,
pub instructions: String,
pub tools: Vec<AssistantTools>,
pub metadata: Option<HashMap<String, Value>>,
pub usage: Option<RunCompletionUsage>,
pub temperature: Option<f32>,
pub top_p: Option<f32>,
pub max_prompt_tokens: Option<u32>,
pub max_completion_tokens: Option<u32>,
pub truncation_strategy: Option<TruncationObject>,
pub tool_choice: Option<AssistantsApiToolChoiceOption>,
pub parallel_tool_calls: bool,
pub response_format: Option<AssistantsApiResponseFormatOption>,
}
Expand description
Represents an execution run on a thread.
Fields§
§id: String
The identifier, which can be referenced in API endpoints.
object: String
The object type, which is always thread.run
.
created_at: i32
The Unix timestamp (in seconds) for when the run was created.
thread_id: String
The ID of the thread that was executed on as a part of this run.
assistant_id: Option<String>
The ID of the assistant used for execution of this run.
status: RunStatus
The status of the run, which can be either queued
, in_progress
, requires_action
, cancelling
, cancelled
, failed
, completed
, incomplete
, or expired
.
required_action: Option<RequiredAction>
Details on the action required to continue the run. Will be null
if no action is required.
last_error: Option<LastError>
The last error associated with this run. Will be null
if there are no errors.
expires_at: Option<i32>
The Unix timestamp (in seconds) for when the run will expire.
started_at: Option<i32>
The Unix timestamp (in seconds) for when the run was started.
cancelled_at: Option<i32>
The Unix timestamp (in seconds) for when the run was cancelled.
failed_at: Option<i32>
The Unix timestamp (in seconds) for when the run failed.
completed_at: Option<i32>
The Unix timestamp (in seconds) for when the run was completed.
incomplete_details: Option<RunObjectIncompleteDetails>
Details on why the run is incomplete. Will be null
if the run is not incomplete.
model: String
The model that the assistant used for this run.
instructions: String
The instructions that the assistant used for this run.
tools: Vec<AssistantTools>
The list of tools that the assistant used for this run.
metadata: Option<HashMap<String, Value>>
§usage: Option<RunCompletionUsage>
Usage statistics related to the run. This value will be null
if the run is not in a terminal state (i.e. in_progress
, queued
, etc.).
temperature: Option<f32>
The sampling temperature used for this run. If not set, defaults to 1.
top_p: Option<f32>
The nucleus sampling value used for this run. If not set, defaults to 1.
max_prompt_tokens: Option<u32>
The maximum number of prompt tokens specified to have been used over the course of the run.
max_completion_tokens: Option<u32>
The maximum number of completion tokens specified to have been used over the course of the run.
truncation_strategy: Option<TruncationObject>
Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.
tool_choice: Option<AssistantsApiToolChoiceOption>
§parallel_tool_calls: bool
Whether to enable parallel function calling during tool use.
response_format: Option<AssistantsApiResponseFormatOption>