interface BaseCodeExecutorConfig {
    optimizeDataFile?: boolean;
    stateful?: boolean;
    errorRetryAttempts?: number;
    codeBlockDelimiters?: [string, string][];
    executionResultDelimiters?: [string, string];
}

Properties

optimizeDataFile?: boolean

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

Whether the code executor is stateful. Default to false.

errorRetryAttempts?: number

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

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")
executionResultDelimiters?: [string, string]

The delimiters to format the code execution result.