openai_struct/models/run_object.rs
1/*
2 * OpenAI API
3 *
4 * The OpenAI REST API. Please see pub https://platform.openai.com/docs/api-reference for more details.
5 *
6 * OpenAPI spec pub version: 2.3.0
7 *
8 * Generated pub by: https://github.com/swagger-api/swagger-codegen.git
9 */
10
11/// pub RunObject : Represents an execution run on a [thread](/docs/api-reference/threads).
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16#[derive(Debug, Serialize, Deserialize)]
17pub struct RunObject {
18 /// The ID of the [assistant](/docs/api-reference/assistants) used for execution of this run.
19 #[serde(rename = "assistant_id")]
20 pub assistant_id: String,
21 /// The Unix timestamp (in seconds) for when the run was cancelled.
22 #[serde(rename = "cancelled_at")]
23 pub cancelled_at: i32,
24 /// The Unix timestamp (in seconds) for when the run was completed.
25 #[serde(rename = "completed_at")]
26 pub completed_at: i32,
27 /// The Unix timestamp (in seconds) for when the run was created.
28 #[serde(rename = "created_at")]
29 pub created_at: i32,
30 /// The Unix timestamp (in seconds) for when the run will expire.
31 #[serde(rename = "expires_at")]
32 pub expires_at: i32,
33 /// The Unix timestamp (in seconds) for when the run failed.
34 #[serde(rename = "failed_at")]
35 pub failed_at: i32,
36 /// The identifier, which can be referenced in API endpoints.
37 #[serde(rename = "id")]
38 pub id: String,
39 #[serde(rename = "incomplete_details")]
40 pub incomplete_details: crate::models::RunObjectIncompleteDetails,
41 /// The instructions that the [assistant](/docs/api-reference/assistants) used for this run.
42 #[serde(rename = "instructions")]
43 pub instructions: String,
44 #[serde(rename = "last_error")]
45 pub last_error: crate::models::RunObjectLastError,
46 /// The maximum number of completion tokens specified to have been used over the course of the run.
47 #[serde(rename = "max_completion_tokens")]
48 pub max_completion_tokens: i32,
49 /// The maximum number of prompt tokens specified to have been used over the course of the run.
50 #[serde(rename = "max_prompt_tokens")]
51 pub max_prompt_tokens: i32,
52 #[serde(rename = "metadata")]
53 pub metadata: crate::models::Metadata,
54 /// The model that the [assistant](/docs/api-reference/assistants) used for this run.
55 #[serde(rename = "model")]
56 pub model: String,
57 /// The object type, which is always `thread.run`.
58 #[serde(rename = "object")]
59 pub object: String,
60 #[serde(rename = "parallel_tool_calls")]
61 pub parallel_tool_calls: crate::models::ParallelToolCalls,
62 #[serde(rename = "required_action")]
63 pub required_action: crate::models::RunObjectRequiredAction,
64 #[serde(rename = "response_format")]
65 pub response_format: crate::models::AssistantsApiResponseFormatOption,
66 /// The Unix timestamp (in seconds) for when the run was started.
67 #[serde(rename = "started_at")]
68 pub started_at: i32,
69 /// The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, `incomplete`, or `expired`.
70 #[serde(rename = "status")]
71 pub status: String,
72 /// The sampling temperature used for this run. If not set, defaults to 1.
73 #[serde(rename = "temperature")]
74 pub temperature: Option<f32>,
75 /// The ID of the [thread](/docs/api-reference/threads) that was executed on as a part of this run.
76 #[serde(rename = "thread_id")]
77 pub thread_id: String,
78 #[serde(rename = "tool_choice")]
79 pub tool_choice: crate::models::CreateRunRequestToolChoice,
80 /// The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.
81 #[serde(rename = "tools")]
82 pub tools: Vec<Value>,
83 /// The nucleus sampling value used for this run. If not set, defaults to 1.
84 #[serde(rename = "top_p")]
85 pub top_p: Option<f32>,
86 #[serde(rename = "truncation_strategy")]
87 pub truncation_strategy: crate::models::CreateRunRequestToolChoice,
88 #[serde(rename = "usage")]
89 pub usage: crate::models::RunCompletionUsage,
90}