CodeInterpreter

data class CodeInterpreter(val input: String, val outputs: List<CodeInterpreter.Output>)

Represents the data for a Tool.Type.CODE_INTERPRETER tool call. This contains the code that was run by the code interpreter, and the outputs of the code interpreter.

Constructors

Link copied to clipboard
constructor(input: String, outputs: List<CodeInterpreter.Output>)

Types

Link copied to clipboard

Represents an Output.Type.IMAGE output. This only holds the ID of the generated image file. You can use this ID to retrieve the image file.

Link copied to clipboard
data class LogOutput(val logs: String) : CodeInterpreter.Output

Represents an Output.Type.LOGS output. This only holds the text that was outputted by the code interpreter.

Link copied to clipboard
sealed class Output

A sealed class that represents the output of 1 CodeInterpreter step.

Properties

Link copied to clipboard

The code that was run by the code interpreter

Link copied to clipboard

The data output by the code interpreter