llama-index-tools-metaphor


Namellama-index-tools-metaphor JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
Summaryllama-index tools metaphor integration
upload_time2024-08-22 07:35:03
maintainerajhofmann
docs_urlNone
authorYour Name
requires_python<4.0,>=3.8.1
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Metaphor Tool

# ================================================================================

NOTE: Deprecated in favor of Exa Tool.

# ================================================================================

This tool connects to [Metaphor](https://metaphor.systems/) 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](https://dashboard.metaphor.systems).

## Usage

This tool has more a extensive example usage documented in a Jupyter notebook [here](https://github.com/run-llama/llama_index/blob/main/llama-index-integrations/tools/llama-index-tools-metaphor/examples/metaphor.ipynb)

Here's an example usage of the MetaphorToolSpec.

```python
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.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "llama-index-tools-metaphor",
    "maintainer": "ajhofmann",
    "docs_url": null,
    "requires_python": "<4.0,>=3.8.1",
    "maintainer_email": null,
    "keywords": null,
    "author": "Your Name",
    "author_email": "you@example.com",
    "download_url": "https://files.pythonhosted.org/packages/20/64/0a15e9d8b262973956a59257bfcea99a1764c5424dcccec5f446f7460c7d/llama_index_tools_metaphor-0.2.0.tar.gz",
    "platform": null,
    "description": "# Metaphor Tool\n\n# ================================================================================\n\nNOTE: Deprecated in favor of Exa Tool.\n\n# ================================================================================\n\nThis tool connects to [Metaphor](https://metaphor.systems/) to easily enable\nyour agent to search and get HTML content from the Internet.\n\nTo begin, you need to obtain an API key on the [Metaphor developer dashboard](https://dashboard.metaphor.systems).\n\n## Usage\n\nThis tool has more a extensive example usage documented in a Jupyter notebook [here](https://github.com/run-llama/llama_index/blob/main/llama-index-integrations/tools/llama-index-tools-metaphor/examples/metaphor.ipynb)\n\nHere's an example usage of the MetaphorToolSpec.\n\n```python\nfrom llama_index.tools.metaphor import MetaphorToolSpec\nfrom llama_index.agent.openai import OpenAIAgent\n\nmetaphor_tool = MetaphorToolSpec(\n    api_key=\"your-key\",\n)\nagent = OpenAIAgent.from_tools(metaphor_tool.to_tool_list())\n\nagent.chat(\n    \"Can you summarize the news published in the last month on superconductors\"\n)\n```\n\n`search`: Search for a list of articles relating to a natural language query\n`retrieve_documents`: Retrieve a list of documents returned from `metaphor_search`.\n`search_and_retrieve_documents`: Combines search and retrieve_documents to directly return a list of documents related to a search\n`find_similar`: Find similar documents to a given URL.\n`current_date`: Utility for the Agent to get todays date\n\nThis loader is designed to be used as a way to load data as a Tool in a Agent.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "llama-index tools metaphor integration",
    "version": "0.2.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b22133cec02ea9ce63df09b971606154ee229f492eb24d21c10ec3a361341d7e",
                "md5": "456f54b407d3f7f9722e7c0ee44040e3",
                "sha256": "02da00c0633eebc31ff7bf185131f24ef9e495edaed93568f8476ce474655eb6"
            },
            "downloads": -1,
            "filename": "llama_index_tools_metaphor-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "456f54b407d3f7f9722e7c0ee44040e3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8.1",
            "size": 3520,
            "upload_time": "2024-08-22T07:35:02",
            "upload_time_iso_8601": "2024-08-22T07:35:02.064228Z",
            "url": "https://files.pythonhosted.org/packages/b2/21/33cec02ea9ce63df09b971606154ee229f492eb24d21c10ec3a361341d7e/llama_index_tools_metaphor-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "20640a15e9d8b262973956a59257bfcea99a1764c5424dcccec5f446f7460c7d",
                "md5": "603b6db17d3aedbe1c6da8637c4f95b3",
                "sha256": "dbf26f3a41a547545e379ed23e2658399f17fcc266c470b53eb1816a467497fd"
            },
            "downloads": -1,
            "filename": "llama_index_tools_metaphor-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "603b6db17d3aedbe1c6da8637c4f95b3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8.1",
            "size": 3205,
            "upload_time": "2024-08-22T07:35:03",
            "upload_time_iso_8601": "2024-08-22T07:35:03.416716Z",
            "url": "https://files.pythonhosted.org/packages/20/64/0a15e9d8b262973956a59257bfcea99a1764c5424dcccec5f446f7460c7d/llama_index_tools_metaphor-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-22 07:35:03",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "llama-index-tools-metaphor"
}
        
Elapsed time: 0.73125s