openai_struct/models/
code_interpreter_text_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 CodeInterpreterTextOutput : The output of a code interpreter tool call that is text.
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16/// # on openapi.yaml
17///
18/// ```yaml
19/// CodeInterpreterTextOutput:
20///   type: object
21///   title: Code interpreter text output
22///   description: |
23///     The output of a code interpreter tool call that is text.
24///   properties:
25///     type:
26///       type: string
27///       enum:
28///         - logs
29///       description: |
30///         The type of the code interpreter text output. Always `logs`.
31///       x-stainless-const: true
32///     logs:
33///       type: string
34///       description: |
35///         The logs of the code interpreter tool call.
36///   required:
37///     - type
38///     - logs
39/// ```
40#[derive(Debug, Serialize, Deserialize)]
41pub struct CodeInterpreterTextOutput {
42    /// The logs of the code interpreter tool call.
43    #[serde(rename = "logs")]
44    pub logs: String,
45    /// The type of the code interpreter text output. Always `logs`.
46    #[serde(rename = "type")]
47    #[serde(default = "default_type")]
48    pub _type: String,
49}
50
51impl Default for CodeInterpreterTextOutput {
52    fn default() -> CodeInterpreterTextOutput {
53        Self {
54            logs: "".to_string(),
55            _type: default_type(),
56        }
57    }
58}
59
60fn default_type() -> String {
61    "logs".into()
62}