openai_struct/models/run_step_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 RunStepObject : Represents a step in execution of a run.
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16#[derive(Debug, Serialize, Deserialize)]
17pub struct RunStepObject {
18 /// The ID of the [assistant](/docs/api-reference/assistants) associated with the run step.
19 #[serde(rename = "assistant_id")]
20 pub assistant_id: String,
21 /// The Unix timestamp (in seconds) for when the run step was cancelled.
22 #[serde(rename = "cancelled_at")]
23 pub cancelled_at: i32,
24 /// The Unix timestamp (in seconds) for when the run step completed.
25 #[serde(rename = "completed_at")]
26 pub completed_at: i32,
27 /// The Unix timestamp (in seconds) for when the run step was created.
28 #[serde(rename = "created_at")]
29 pub created_at: i32,
30 /// The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired.
31 #[serde(rename = "expired_at")]
32 pub expired_at: i32,
33 /// The Unix timestamp (in seconds) for when the run step failed.
34 #[serde(rename = "failed_at")]
35 pub failed_at: i32,
36 /// The identifier of the run step, which can be referenced in API endpoints.
37 #[serde(rename = "id")]
38 pub id: String,
39 #[serde(rename = "last_error")]
40 pub last_error: crate::models::RunStepObjectLastError,
41 #[serde(rename = "metadata")]
42 pub metadata: crate::models::Metadata,
43 /// The object type, which is always `thread.run.step`.
44 #[serde(rename = "object")]
45 pub object: String,
46 /// The ID of the [run](/docs/api-reference/runs) that this run step is a part of.
47 #[serde(rename = "run_id")]
48 pub run_id: String,
49 /// The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`.
50 #[serde(rename = "status")]
51 pub status: String,
52 /// The details of the run step.
53 #[serde(rename = "step_details")]
54 pub step_details: Value,
55 /// The ID of the [thread](/docs/api-reference/threads) that was run.
56 #[serde(rename = "thread_id")]
57 pub thread_id: String,
58 /// The type of run step, which can be either `message_creation` or `tool_calls`.
59 #[serde(rename = "type")]
60 pub _type: String,
61 #[serde(rename = "usage")]
62 pub usage: crate::models::RunStepCompletionUsage,
63}