openai_struct/models/
computer_call_output_item_param.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 ComputerCallOutputItemParam : The output of a computer tool call.
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16/// # on openapi.yaml
17///
18/// ```yaml
19/// ComputerCallOutputItemParam:
20///   properties:
21///     id:
22///       anyOf:
23///         - type: string
24///           description: The ID of the computer tool call output.
25///         - type: "null"
26///     call_id:
27///       type: string
28///       maxLength: 64
29///       minLength: 1
30///       description: The ID of the computer tool call that produced the output.
31///     type:
32///       type: string
33///       enum:
34///         - computer_call_output
35///       description: The type of the computer tool call output. Always
36///         `computer_call_output`.
37///       default: computer_call_output
38///       x-stainless-const: true
39///     output:
40///       $ref: "#/components/schemas/ComputerScreenshotImage"
41///     acknowledged_safety_checks:
42///       anyOf:
43///         - items:
44///             $ref: "#/components/schemas/ComputerCallSafetyCheckParam"
45///           type: array
46///           description:
47///             The safety checks reported by the API that have been acknowledged
48///             by the developer.
49///         - type: "null"
50///     status:
51///       anyOf:
52///         - type: string
53///           enum:
54///             - in_progress
55///             - completed
56///             - incomplete
57///           description:
58///             The status of the message input. One of `in_progress`, `completed`,
59///             or `incomplete`. Populated when input items are returned via
60///             API.
61///         - type: "null"
62///   type: object
63///   required:
64///     - call_id
65///     - type
66///     - output
67///   title: Computer tool call output
68///   description: The output of a computer tool call.
69/// ```
70#[derive(Debug, Serialize, Deserialize)]
71pub struct ComputerCallOutputItemParam {
72    #[serde(rename = "acknowledged_safety_checks")]
73    pub acknowledged_safety_checks: Option<Vec<crate::ComputerCallSafetyCheckParam>>,
74    /// The ID of the computer tool call that produced the output.
75    #[serde(rename = "call_id")]
76    pub call_id: String,
77    /// type: "null" or type: string of The ID of the computer tool call output.
78    #[serde(rename = "id")]
79    pub id: Option<String>,
80    #[serde(rename = "output")]
81    pub output: crate::models::ComputerScreenshotImage,
82    /// anyOf: string`in_progress`、string`completed`、string`incomplete` or Option`null`
83    #[serde(rename = "status")]
84    pub status: Option<String>,
85    /// The type of the computer tool call output. Always `computer_call_output`.
86    #[serde(rename = "type")]
87    #[serde(default = "default_type")]
88    pub _type: String,
89}
90
91fn default_type() -> String {
92    "computer_call_output".into()
93}