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
73
74
75
76
77
78
79
80
81
82
83
84
/*
* 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 CodeInterpreterToolCall : A tool call to run code.
#[allow(unused_imports)]
use serde_json::Value;
/// # on openapi.yaml
///
/// ```yaml
/// CodeInterpreterToolCall:
/// type: object
/// title: Code interpreter tool call
/// description: |
/// A tool call to run code.
/// properties:
/// id:
/// type: string
/// description: |
/// The unique ID of the code interpreter tool call.
/// type:
/// type: string
/// enum:
/// - code_interpreter_call
/// description: >
/// The type of the code interpreter tool call. Always
/// `code_interpreter_call`.
/// x-stainless-const: true
/// code:
/// type: string
/// description: |
/// The code to run.
/// status:
/// type: string
/// enum:
/// - in_progress
/// - interpreting
/// - completed
/// description: |
/// The status of the code interpreter tool call.
/// results:
/// type: array
/// items:
/// $ref: "#/components/schemas/CodeInterpreterToolOutput"
/// description: |
/// The results of the code interpreter tool call.
/// required:
/// - id
/// - type
/// - code
/// - status
/// - results
/// ```
#[derive(Debug, Serialize, Deserialize)]
pub struct CodeInterpreterToolCall {
/// The code to run.
#[serde(rename = "code")]
pub code: String,
/// The unique ID of the code interpreter tool call.
#[serde(rename = "id")]
pub id: String,
/// The results of the code interpreter tool call.
#[serde(rename = "results")]
pub results: Vec<crate::models::CodeInterpreterToolOutput>,
/// The status of the code interpreter tool call.
#[serde(rename = "status")]
pub status: String,
/// The type of the code interpreter tool call. Always `code_interpreter_call`.
#[serde(rename = "type")]
#[serde(default = "default_type")]
pub _type: String,
}
fn default_type() -> String {
"code_interpreter_call".into()
}