adk-typescript
Version:
TypeScript port of Google's Agent Development Kit (ADK)
35 lines (34 loc) • 1.31 kB
TypeScript
import { InvocationContext } from "../agents/InvocationContext";
import { BaseCodeExecutor } from "./baseCodeExecutor";
import { CodeExecutionInput, CodeExecutionResult } from "./codeExecutionUtils";
/**
* A code executor that unsafely execute code in the current local context.
*/
export declare class UnsafeLocalCodeExecutor extends BaseCodeExecutor {
/**
* Overrides the BaseCodeExecutor attribute: this executor cannot be stateful.
*/
stateful: boolean;
/**
* Overrides the BaseCodeExecutor attribute: this executor cannot optimize_data_file.
*/
optimizeDataFile: boolean;
/**
* Initializes the UnsafeLocalCodeExecutor.
*/
constructor(params?: {
stateful?: boolean;
optimizeDataFile?: boolean;
errorRetryAttempts?: number;
codeBlockDelimiters?: [string, string][];
executionResultDelimiters?: [string, string];
});
/**
* Executes code and return the code execution result.
*
* @param invocationContext - The invocation context of the code execution.
* @param codeExecutionInput - The code execution input.
* @returns The code execution result.
*/
executeCode(invocationContext: InvocationContext, codeExecutionInput: CodeExecutionInput): Promise<CodeExecutionResult>;
}