0.9.0 • Published 1 year ago

@modelfusion/serpapi-tools v0.9.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

SerpAPI WebSearch Tools for ModelFusion

SerpAPI is a service that provides search results from Google, Bing, and other search engines. Currently only the Google search is supported as a tool.

Requirements

Setup

  1. Sign up at SerpAPI and get an API key.

  2. Install the SerpAPI tools for ModelFusion:

    npm i @modelfusion/serpapi-tools
  3. Add your SERPAPI_API_KEY to your environment variables or .env file.

Usage

Creating a SerpAPI Google Search Tool

import { SerpapiGoogleWebSearchTool } from "@modelfusion/serpapi-tools";

const websearchTool = new SerpapiGoogleWebSearchTool({
  name: "websearch",
  description: "Search the web.",
  num: 3,
});

You can then use the tool with useTool or executeTool:

const result = await executeTool(websearchTool, {
  query: "modelfusion",
});

Development

Setup

npm i
npm link modelfusion
0.9.0

1 year ago

0.8.0

1 year ago

0.7.0

1 year ago

0.6.0

1 year ago

0.5.0

1 year ago

0.4.0

1 year ago

0.3.0

1 year ago

0.2.0

1 year ago

0.1.0

1 year ago