pub struct RunObject {Show 27 fields
pub id: String,
pub object: String,
pub created_at: i64,
pub thread_id: String,
pub assistant_id: String,
pub status: String,
pub required_action: Option<RequiredAction>,
pub last_error: Option<RunLastError>,
pub expires_at: Option<i64>,
pub started_at: Option<i64>,
pub cancelled_at: Option<i64>,
pub failed_at: Option<i64>,
pub completed_at: Option<i64>,
pub incomplete_details: Option<IncompleteDetails>,
pub model: String,
pub instructions: Option<String>,
pub tools: Vec<Tool>,
pub metadata: Option<Metadata>,
pub usage: Option<CompletionUsage>,
pub temperature: Option<f32>,
pub top_p: Option<f32>,
pub max_prompt_tokens: Option<i32>,
pub max_completion_tokens: Option<i32>,
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.
§Used By
/threads/runs(POST response)/threads/{thread_id}/runs(GET - inListRunsResponse, POST response)/threads/{thread_id}/runs/{run_id}(GET, POST response)/threads/{thread_id}/runs/{run_id}/cancel(POST response)/threads/{thread_id}/runs/{run_id}/submit_tool_outputs(POST response)AssistantStreamEvent::ThreadRunCreatedand other run status events
Fields§
§id: StringThe identifier, which can be referenced in API endpoints.
object: StringThe object type, which is always thread.run.
created_at: i64The Unix timestamp (in seconds) for when the run was created.
thread_id: StringThe ID of the thread that was executed on.
assistant_id: StringThe ID of the assistant used for execution.
status: StringThe status of the run.
required_action: Option<RequiredAction>Details on the action required to continue the run. Null if no action is required.
last_error: Option<RunLastError>The last error associated with this run. Null if no errors.
expires_at: Option<i64>The Unix timestamp (in seconds) for when the run will expire.
started_at: Option<i64>The Unix timestamp (in seconds) for when the run was started.
cancelled_at: Option<i64>The Unix timestamp (in seconds) for when the run was cancelled.
failed_at: Option<i64>The Unix timestamp (in seconds) for when the run failed.
completed_at: Option<i64>The Unix timestamp (in seconds) for when the run was completed.
incomplete_details: Option<IncompleteDetails>Details on why the run is incomplete. Null if the run is not incomplete.
model: StringThe model that the assistant used for this run.
instructions: Option<String>The instructions that the assistant used for this run.
tools: Vec<Tool>The list of tools that the assistant used for this run.
metadata: Option<Metadata>Set of 16 key-value pairs attached to the object.
usage: Option<CompletionUsage>Usage statistics related to the run. Null if the run is not in a terminal state.
temperature: Option<f32>The sampling temperature used for this run.
top_p: Option<f32>The nucleus sampling value used for this run.
max_prompt_tokens: Option<i32>The maximum number of prompt tokens specified for the run.
max_completion_tokens: Option<i32>The maximum number of completion tokens specified for the run.
truncation_strategy: Option<TruncationObject>The truncation strategy used for the run.
tool_choice: Option<AssistantsApiToolChoiceOption>The tool choice strategy used for the run.
parallel_tool_calls: boolWhether parallel tool calls were enabled for this run.
response_format: Option<AssistantsApiResponseFormatOption>The response format specified for this run.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RunObject
impl<'de> Deserialize<'de> for RunObject
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for RunObject
Auto Trait Implementations§
impl Freeze for RunObject
impl RefUnwindSafe for RunObject
impl Send for RunObject
impl Sync for RunObject
impl Unpin for RunObject
impl UnwindSafe for RunObject
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<C, E> EntryToVal<C> for Ewhere
C: Collection<Entry = E>,
impl<C, E> EntryToVal<C> for Ewhere
C: Collection<Entry = E>,
Source§type Val = <C as Collection>::Val
type Val = <C as Collection>::Val
Entry in complex collections.
For example, in a HashMap, while Entry might be a ( key, value ) tuple, Val might only be the value part.Source§fn entry_to_val(self) -> <E as EntryToVal<C>>::Val
fn entry_to_val(self) -> <E as EntryToVal<C>>::Val
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<C, Val> ValToEntry<C> for Valwhere
C: CollectionValToEntry<Val>,
impl<C, Val> ValToEntry<C> for Valwhere
C: CollectionValToEntry<Val>,
Source§fn val_to_entry(self) -> <C as CollectionValToEntry<Val>>::Entry
fn val_to_entry(self) -> <C as CollectionValToEntry<Val>>::Entry
Invokes the val_to_entry function of the CollectionValToEntry trait to convert the value to an entry.
Source§type Entry = <C as CollectionValToEntry<Val>>::Entry
type Entry = <C as CollectionValToEntry<Val>>::Entry
Entry is defined by the Collection trait.