llama-index-tools-metaphor


Namellama-index-tools-metaphor JSON
Version 0.3.0 PyPI version JSON
download
home_pageNone
Summaryllama-index tools metaphor integration
upload_time2024-11-17 23:03:26
maintainerajhofmann
docs_urlNone
authorYour Name
requires_python<4.0,>=3.9
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.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Your Name",
    "author_email": "you@example.com",
    "download_url": "https://files.pythonhosted.org/packages/18/2e/68c01fe75a236cbb5dad4e330e192c28a69b0f40a19ed59cdfcebac94fd6/llama_index_tools_metaphor-0.3.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.3.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "07533bf20bf5d11dbeecd140223f15f156283393f3c1848b62b18f50d67b2d13",
                "md5": "691931554dd3cb5537fdc08c43b8a20e",
                "sha256": "0c309754e48841ca78218d9d7177c51c554c6898a56146a4e477fcaccfa7d043"
            },
            "downloads": -1,
            "filename": "llama_index_tools_metaphor-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "691931554dd3cb5537fdc08c43b8a20e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 3517,
            "upload_time": "2024-11-17T23:03:25",
            "upload_time_iso_8601": "2024-11-17T23:03:25.504810Z",
            "url": "https://files.pythonhosted.org/packages/07/53/3bf20bf5d11dbeecd140223f15f156283393f3c1848b62b18f50d67b2d13/llama_index_tools_metaphor-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "182e68c01fe75a236cbb5dad4e330e192c28a69b0f40a19ed59cdfcebac94fd6",
                "md5": "17d21fedd5a98bbbe382fa5b78c89171",
                "sha256": "3d74daa57e7edf595a9114f27c1f367fd2ac4eecf8c34acb971c4e4488e2da30"
            },
            "downloads": -1,
            "filename": "llama_index_tools_metaphor-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "17d21fedd5a98bbbe382fa5b78c89171",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 3197,
            "upload_time": "2024-11-17T23:03:26",
            "upload_time_iso_8601": "2024-11-17T23:03:26.381213Z",
            "url": "https://files.pythonhosted.org/packages/18/2e/68c01fe75a236cbb5dad4e330e192c28a69b0f40a19ed59cdfcebac94fd6/llama_index_tools_metaphor-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-17 23:03:26",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "llama-index-tools-metaphor"
}
        
Elapsed time: 0.40992s