@modelfusion/mediawiki-search-tool
v0.1.0
Published
MediaWiki search tool for ModelFusion
Downloads
5
Maintainers
Readme
MediaWiki Search Tool for ModelFusion
Searches MediaWiki instances, such as Wikipedia, using their opensearch
API endpoint.
Installation
npm install @modelfusion/mediawiki-search-tool
Usage
import { MediaWikiSearchTool } from "@modelfusion/mediawiki-search-tool";
const searchWikipedia = new MediaWikiSearchTool({
url: "https://en.wikipedia.org/w/api.php",
name: "search_wikipedia",
description: "Search Wikipedia pages using a query",
profile: "fuzzy",
maxResults: 5,
});
You can then use the tool with useTool
or executeTool
:
const result = await executeTool(searchWikipedia, {
query: "Albert Einstein",
});