GeezerVison is showing adk.dev — BuiltInCodeExecutor | ADK for TypeScript: API Reference - v2.5.0
Class BuiltInCodeExecutor
A code executor that uses the Model's built-in code executor.
Currently only supports Gemini 2.0+ models, but will be expanded to
other models.
Constructors
constructor
-
new BuiltInCodeExecutor(): BuiltInCodeExecutor
Returns BuiltInCodeExecutor
Properties
Readonly[BASE_CODE_EXECUTOR_SIGNATURE_SYMBOL]
"[BASE_CODE_EXECUTOR_SIGNATURE_SYMBOL]": true
A unique symbol to identify BaseCodeExecutor class.
Readonly[BUILT_IN_CODE_EXECUTOR_SIGNATURE_SYMBOL]
"[BUILT_IN_CODE_EXECUTOR_SIGNATURE_SYMBOL]": true
A unique symbol to identify BuiltInCodeExecutor class.
codeBlockDelimiters
codeBlockDelimiters: [string, string][] = ...
The list of the enclosing delimiters to identify the code blocks.
For example, the delimiter('javascript\\n', '\\n') can be used to
identify code blocks with the following format:
console.log("hello")
errorRetryAttempts
errorRetryAttempts: number = 2
The number of attempts to retry on consecutive code execution errors.
Default to 2.
executionResultDelimiters
executionResultDelimiters: [string, string] = ...
The delimiters to format the code execution result.
optimizeDataFile
optimizeDataFile: boolean = false
If true, extract and process data files from the model request
and attach them to the code executor.
Supported data file MimeTypes are [text/csv].
Default to false.
stateful
stateful: boolean = false
Whether the code executor is stateful. Default to false.
Methods
executeCode
-
Executes code and return the code execution result.
The result of the code execution.
Constructors
Properties
Methods