ExecutableCode

@Serializable
data class ExecutableCode(val code: String? = null, val language: Language? = null, val id: String? = null)

Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the CodeExecution tool, in which the code will be automatically executed, and a corresponding CodeExecutionResult will also be generated.

Constructors

Link copied to clipboard
constructor(code: String? = null, language: Language? = null, id: String? = null)

Properties

Link copied to clipboard
val code: String? = null

Required. The code to be executed.

Link copied to clipboard
val id: String? = null

Optional. Unique identifier of the ExecutableCode part. The server returns the CodeExecutionResult with the matching id. This field is not supported in Vertex AI.

Link copied to clipboard
val language: Language? = null

Required. Programming language of the code.