Skip to main content

llama-index tools metaphor integration

Project description

Metaphor Tool

This tool connects to Metaphor to easily enable your agent to search and get HTML content from the Internet.

To begin, you need to obtain an API key on the Metaphor developer dashboard.

Usage

This tool has more a extensive example usage documented in a Jupyter notebook here

Here's an example usage of the MetaphorToolSpec.

from llama_index.tools.metaphor import MetaphorToolSpec
from llama_index.agent import OpenAIAgent

metaphor_tool = MetaphorToolSpec(
    api_key="your-key",
)
agent = OpenAIAgent.from_tools(metaphor_tool.to_tool_list())

agent.chat(
    "Can you summarize the news published in the last month on superconductors"
)

search: Search for a list of articles relating to a natural language query retrieve_documents: Retrieve a list of documents returned from metaphor_search. search_and_retrieve_documents: Combines search and retrieve_documents to directly return a list of documents related to a search find_similar: Find similar documents to a given URL. current_date: Utility for the Agent to get todays date

This loader is designed to be used as a way to load data as a Tool in a Agent. See here for examples.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_tools_metaphor-0.0.1.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page