Package com.google.genai.types
Class CodeExecutionResult
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.CodeExecutionResult
Result of executing the `ExecutableCode`.
Generated only when the `CodeExecution` tool is used.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for CodeExecutionResult. -
Field Summary
Fields inherited from class com.google.genai.JsonSerializable
MAX_READ_LENGTH_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CodeExecutionResult.Builderbuilder()Instantiates a builder for CodeExecutionResult.static CodeExecutionResultDeserializes a JSON string to a CodeExecutionResult object.id()The identifier of the `ExecutableCode` part this result is for.outcome()Required.output()Optional.abstract CodeExecutionResult.BuilderCreates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString
-
Constructor Details
-
CodeExecutionResult
public CodeExecutionResult()
-
-
Method Details
-
outcome
Required. Outcome of the code execution. -
output
Optional. Contains stdout when code execution is successful, stderr or other description otherwise. -
id
The identifier of the `ExecutableCode` part this result is for. Only populated if the corresponding `ExecutableCode` has an id. -
builder
Instantiates a builder for CodeExecutionResult. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a CodeExecutionResult object.
-