ADK for TypeScript: API Reference
    Preparing search index...

    Class BaseCodeExecutorAbstract

    The code executor allows the agent to execute code blocks from model responses and incorporate the execution results into the final response.

    Hierarchy (View Summary)

    Constructors

    Properties

    "[BASE_CODE_EXECUTOR_SIGNATURE_SYMBOL]": true

    A unique symbol to identify BaseCodeExecutor class.

    codeBlockDelimiters: [string, string][] = ...

    The list of the enclosing delimiters to identify the code blocks. For example, the delimiter('python\\n', '\\n') can be used to identify code blocks with the following format::

     print("hello")
    
    errorRetryAttempts: number = 2

    The number of attempts to retry on consecutive code execution errors. Default to 2.

    executionResultDelimiters: [string, string] = ...

    The delimiters to format the code execution result.

    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: boolean = false

    Whether the code executor is stateful. Default to false.

    Methods