openai_struct/models/computer_screenshot_image.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 ComputerScreenshotImage : A computer screenshot image used with the computer use tool.
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16/// # on openapi.yaml
17///
18/// ```yaml
19/// ComputerScreenshotImage:
20/// type: object
21/// description: |
22/// A computer screenshot image used with the computer use tool.
23/// properties:
24/// type:
25/// type: string
26/// enum:
27/// - computer_screenshot
28/// default: computer_screenshot
29/// description: >
30/// Specifies the event type. For a computer screenshot, this property
31/// is
32///
33/// always set to `computer_screenshot`.
34/// x-stainless-const: true
35/// image_url:
36/// type: string
37/// description: The URL of the screenshot image.
38/// file_id:
39/// type: string
40/// description: The identifier of an uploaded file that contains the screenshot.
41/// required:
42/// - type
43/// ```
44#[derive(Debug, Serialize, Deserialize)]
45pub struct ComputerScreenshotImage {
46 /// The identifier of an uploaded file that contains the screenshot.
47 #[serde(rename = "file_id")]
48 pub file_id: Option<String>,
49 /// The URL of the screenshot image.
50 #[serde(rename = "image_url")]
51 pub image_url: Option<String>,
52 /// Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.
53 #[serde(rename = "type")]
54 #[serde(default = "default_type")]
55 pub _type: String,
56}
57
58fn default_type() -> String {
59 "computer_screenshot".into()
60}