1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
* OpenAI API
*
* The OpenAI REST API. Please see pub https:///platform.openai.com/docs/api-reference for more details.
*
* OpenAPI spec pub version: 2.3.0
*
* Generated pub by: https:///github.com/swagger-api/swagger-codegen.git
*/
/// pub ComputerUsePreviewTool : A tool that controls a virtual computer. Learn more about the [computer tool](https:///platform.openai.com/docs/guides/tools-computer-use).
#[allow(unused_imports)]
use serde_json::Value;
/// # on openapi.yaml
///
/// ```yaml
/// ComputerUsePreviewTool:
/// properties:
/// type:
/// type: string
/// enum:
/// - computer_use_preview
/// description: The type of the computer use tool. Always `computer_use_preview`.
/// default: computer_use_preview
/// x-stainless-const: true
/// environment:
/// type: string
/// enum:
/// - windows
/// - mac
/// - linux
/// - ubuntu
/// - browser
/// description: The type of computer environment to control.
/// display_width:
/// type: integer
/// description: The width of the computer display.
/// display_height:
/// type: integer
/// description: The height of the computer display.
/// type: object
/// required:
/// - type
/// - environment
/// - display_width
/// - display_height
/// title: Computer use preview
/// description: A tool that controls a virtual computer. Learn more about the
/// [computer tool](https:///platform.openai.com/docs/guides/tools-computer-use).
/// ```
#[derive(Debug, Serialize, Deserialize)]
pub struct ComputerUsePreviewTool {
/// The height of the computer display.
#[serde(rename = "display_height")]
pub display_height: i32,
/// The width of the computer display.
#[serde(rename = "display_width")]
pub display_width: i32,
/// The type of computer environment to control.
#[serde(rename = "environment")]
pub environment: String,
/// The type of the computer use tool. Always `computer_use_preview`.
#[serde(rename = "type")]
#[serde(default = "default_type")]
pub _type: String,
}
fn default_type() -> String {
"computer_use_preview".into()
}