Skip to main content

llama-index tools metaphor integration

Project description

Metaphor Tool

================================================================================

NOTE: Deprecated in favor of Exa 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.openai 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.

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.3.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file llama_index_tools_metaphor-0.3.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_tools_metaphor-0.3.0.tar.gz
Algorithm Hash digest
SHA256 3d74daa57e7edf595a9114f27c1f367fd2ac4eecf8c34acb971c4e4488e2da30
MD5 17d21fedd5a98bbbe382fa5b78c89171
BLAKE2b-256 182e68c01fe75a236cbb5dad4e330e192c28a69b0f40a19ed59cdfcebac94fd6

See more details on using hashes here.

File details

Details for the file llama_index_tools_metaphor-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_tools_metaphor-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0c309754e48841ca78218d9d7177c51c554c6898a56146a4e477fcaccfa7d043
MD5 691931554dd3cb5537fdc08c43b8a20e
BLAKE2b-256 07533bf20bf5d11dbeecd140223f15f156283393f3c1848b62b18f50d67b2d13

See more details on using hashes here.

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