Class ExecutableCode (1.140.0)

ExecutableCode(
    *,
    code: typing.Optional[str] = None,
    language: typing.Optional[vertexai._genai.types.common.Language] = None
)

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.

Methods

ExecutableCode

ExecutableCode(
    *,
    code: typing.Optional[str] = None,
    language: typing.Optional[vertexai._genai.types.common.Language] = None
)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.