openai_struct/models/
computer_tool_call_output.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 ComputerToolCallOutput : 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/// ComputerToolCallOutput:
20///   type: object
21///   title: Computer tool call output
22///   description: |
23///     The output of a computer tool call.
24///   properties:
25///     type:
26///       type: string
27///       description: >
28///         The type of the computer tool call output. Always
29///         `computer_call_output`.
30///       enum:
31///         - computer_call_output
32///       default: computer_call_output
33///       x-stainless-const: true
34///     id:
35///       type: string
36///       description: |
37///         The ID of the computer tool call output.
38///     call_id:
39///       type: string
40///       description: |
41///         The ID of the computer tool call that produced the output.
42///     acknowledged_safety_checks:
43///       type: array
44///       description: >
45///         The safety checks reported by the API that have been acknowledged by
46///         the
47///
48///         developer.
49///       items:
50///         $ref: "#/components/schemas/ComputerToolCallSafetyCheck"
51///     output:
52///       $ref: "#/components/schemas/ComputerScreenshotImage"
53///     status:
54///       type: string
55///       description: >
56///         The status of the message input. One of `in_progress`, `completed`,
57///         or
58///
59///         `incomplete`. Populated when input items are returned via API.
60///       enum:
61///         - in_progress
62///         - completed
63///         - incomplete
64///   required:
65///     - type
66///     - call_id
67///     - output
68/// ```
69#[derive(Debug, Serialize, Deserialize)]
70pub struct ComputerToolCallOutput {
71    /// The safety checks reported by the API that have been acknowledged by the  developer.
72    #[serde(rename = "acknowledged_safety_checks")]
73    pub acknowledged_safety_checks: Option<Vec<crate::models::ComputerToolCallSafetyCheck>>,
74    /// The ID of the computer tool call that produced the output.
75    #[serde(rename = "call_id")]
76    pub call_id: String,
77    /// 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    /// The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.
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}