import { CallbackManagerForToolRun } from "@langchain/core/callbacks/manager"; import { Tool, type ToolParams } from "@langchain/core/tools"; import { JigsawStack } from "jigsawstack"; type JigsawStackType = ReturnType; export type ScrapeInputParams = Omit["0"], "url">; export type ScrapeOutputParams = Awaited>; /** * A tool that leverages the JigsawStack AI Scraper for AI-driven web scraping. * * This tool allows you to scrape web content using advanced AI capabilities provided by JigsawStack. * * To use this tool, set the `JIGSAWSTACK_API_KEY` environment variable. You create a free API key at [JigsawStack](https://jigsawstack.com) * * @example * ```typescript * const tool = new JigsawStackAIScrape({ * params: { * element_prompts: ["Pro plan"] * } * }); * const res = await tool.invoke("https://jigsawstack.com/pricing"); * console.log({ res }); * ``` */ export interface JigsawStackAIScrapeParams extends ToolParams { /** * The API key to use. * @default {process.env.JIGSAWSTACK_API_KEY} */ apiKey?: string; params: ScrapeInputParams; } export declare class JigsawStackAIScrape extends Tool { client: JigsawStackType; params: ScrapeInputParams; static lc_name(): string; description: string; name: string; constructor(fields: JigsawStackAIScrapeParams); protected _call(url: string, _runManager?: CallbackManagerForToolRun): Promise; } export {};