CodeExecutionResult interface Stay organized with collections Save and categorize content based on your preferences.
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
The results of code execution run by the model.
Signature:
exportinterfaceCodeExecutionResultProperties
| Property | Type | Description |
|---|---|---|
| outcome | Outcome | (Public Preview) The result of the code execution. |
| output | string | (Public Preview) The output from the code execution, or an error message if it failed. |
CodeExecutionResult.outcome
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
The result of the code execution.
Signature:
outcome?:Outcome;CodeExecutionResult.output
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
The output from the code execution, or an error message if it failed.
Signature:
output?:string;Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-09 UTC.