UNPKG

@langchain/community

Version:
1 lines • 1.66 kB
{"version":3,"file":"aiplugin.d.cts","names":["Tool","ToolParams","AIPluginToolParams","AIPluginTool","Promise"],"sources":["../../src/tools/aiplugin.d.ts"],"sourcesContent":["import { Tool, type ToolParams } from \"@langchain/core/tools\";\n/**\n * Interface for parameters required to create an instance of\n * AIPluginTool.\n */\nexport interface AIPluginToolParams extends ToolParams {\n name: string;\n description: string;\n apiSpec: string;\n}\n/**\n * Class for creating instances of AI tools from plugins. It extends the\n * Tool class and implements the AIPluginToolParams interface.\n */\nexport declare class AIPluginTool extends Tool implements AIPluginToolParams {\n static lc_name(): string;\n private _name;\n private _description;\n apiSpec: string;\n get name(): string;\n get description(): string;\n constructor(params: AIPluginToolParams);\n /** @ignore */\n _call(_input: string): Promise<string>;\n /**\n * Static method that creates an instance of AIPluginTool from a given\n * plugin URL. It fetches the plugin and its API specification from the\n * provided URL and returns a new instance of AIPluginTool with the\n * fetched data.\n * @param url The URL of the AI plugin.\n * @returns A new instance of AIPluginTool.\n */\n static fromPluginUrl(url: string): Promise<AIPluginTool>;\n}\n//# sourceMappingURL=aiplugin.d.ts.map"],"mappings":";;;;;;AAKA;AASA;AAOwBE,UAhBPA,kBAAAA,SAA2BD,UAgBpBC,CAAAA;EAEGE,IAAAA,EAAAA,MAAAA;EASoBD,WAAAA,EAAAA,MAAAA;EAARC,OAAAA,EAAAA,MAAAA;;;AAlBqC;;;cAAvDD,YAAAA,SAAqBH,IAAAA,YAAgBE;;;;;;;sBAOlCA;;yBAEGE;;;;;;;;;qCASYA,QAAQD"}