adk-typescript
Version:
TypeScript port of Google's Agent Development Kit (ADK)
43 lines (42 loc) • 1.09 kB
TypeScript
import { FunctionTool } from './FunctionTool';
/**
* Interface for a basic Langchain tool
*/
export interface LangchainBaseTool {
/** The name of the tool */
name: string;
/** Description of the tool */
description: string;
/** Function to run the tool */
run: (input: any) => Promise<any>;
/** Schema for the tool arguments (optional) */
argsSchema?: any;
}
/**
* A tool that wraps a Langchain tool
*/
export declare class LangchainTool extends FunctionTool {
/**
* The wrapped Langchain tool
*/
private tool;
/**
* Creates a new Langchain tool
*
* @param tool The Langchain tool to wrap
*/
constructor(tool: LangchainBaseTool);
/**
* Get the function declaration for the tool
*
* @returns The function declaration
*/
getFunctionDeclaration(): Record<string, any>;
}
/**
* Create a new Langchain tool
*
* @param tool The Langchain tool to wrap
* @returns A new LangchainTool instance
*/
export declare function createLangchainTool(tool: LangchainBaseTool): LangchainTool;