Skip to content

Commit 2b9ad04

Browse files
authored
Fix schema of code interpreter call output (#420)
1 parent 641c7cc commit 2b9ad04

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

async-openai/src/types/responses.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,15 +1185,17 @@ pub struct ImageGenerationCallOutput {
11851185
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
11861186
pub struct CodeInterpreterCallOutput {
11871187
/// The code that was executed.
1188-
pub code: String,
1188+
#[serde(skip_serializing_if = "Option::is_none")]
1189+
pub code: Option<String>,
11891190
/// Unique ID of the call.
11901191
pub id: String,
11911192
/// Status of the tool call.
11921193
pub status: String,
11931194
/// ID of the container used to run the code.
11941195
pub container_id: String,
1195-
/// The results of the execution: logs or files.
1196-
pub results: Vec<CodeInterpreterResult>,
1196+
/// The outputs of the execution: logs or files.
1197+
#[serde(skip_serializing_if = "Option::is_none")]
1198+
pub outputs: Option<Vec<CodeInterpreterResult>>,
11971199
}
11981200

11991201
/// Individual result from a code interpreter: either logs or files.

0 commit comments

Comments
 (0)