UNPKG

adk-typescript

Version:

TypeScript port of Google's Agent Development Kit (ADK)

36 lines (35 loc) 1.11 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LongRunningFunctionTool = void 0; const FunctionTool_1 = require("./FunctionTool"); /** * A function tool that returns the result asynchronously. * * This tool is used for long-running operations that may take a significant * amount of time to complete. The framework will call the function. Once the * function returns, the response will be returned asynchronously to the * framework which is identified by the function_call_id. * * Example: * ```typescript * const tool = new LongRunningFunctionTool({ * name: 'long_running_function', * description: 'A long running function', * fn: aLongRunningFunction * }); * ``` */ class LongRunningFunctionTool extends FunctionTool_1.FunctionTool { /** * Creates a new long-running function tool * * @param options Options for the long-running function tool */ constructor(options) { super({ ...options, isLongRunning: true }); } } exports.LongRunningFunctionTool = LongRunningFunctionTool;