llama-index-tools-wikipedia


Namellama-index-tools-wikipedia JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
Summaryllama-index tools wikipedia integration
upload_time2024-08-22 03:25:19
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.
            # Wikipedia Tool

This tool fetches content from wikipedia and makes it available to the agent as a Tool. You can search for pages or load pages directly.

## Usage

This tool has more 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-wikipedia/examples/wikipedia.ipynb)

```python
from llama_index.tools.wikipedia import WikipediaToolSpec
from llama_index.agent.openai import OpenAIAgent

tool_spec = WikipediaToolSpec()

agent = OpenAIAgent.from_tools(tool_spec.to_tool_list())

agent.chat("Who is Ben Afflecks spouse?")
```

`load_data`: Loads a page from wikipedia
`search_data`: Searches wikipedia for a query and loads all matching pages

This loader is designed to be used as a way to load data as a Tool in a Agent.
See [this LlamaIndex tutorial][1] for examples.

[1]: https://gpt-index.readthedocs.io/en/stable/examples/index_structs/knowledge_graph/KnowledgeGraphIndex_vs_VectorStoreIndex_vs_CustomIndex_combined.html#load-data-from-wikipedia

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "llama-index-tools-wikipedia",
    "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/a5/59/9c87dd9fe337c77b8c3c46ff1c10efcd97502ddc834e4828af20e0e0c42d/llama_index_tools_wikipedia-0.2.0.tar.gz",
    "platform": null,
    "description": "# Wikipedia Tool\n\nThis tool fetches content from wikipedia and makes it available to the agent as a Tool. You can search for pages or load pages directly.\n\n## Usage\n\nThis tool has more 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-wikipedia/examples/wikipedia.ipynb)\n\n```python\nfrom llama_index.tools.wikipedia import WikipediaToolSpec\nfrom llama_index.agent.openai import OpenAIAgent\n\ntool_spec = WikipediaToolSpec()\n\nagent = OpenAIAgent.from_tools(tool_spec.to_tool_list())\n\nagent.chat(\"Who is Ben Afflecks spouse?\")\n```\n\n`load_data`: Loads a page from wikipedia\n`search_data`: Searches wikipedia for a query and loads all matching pages\n\nThis loader is designed to be used as a way to load data as a Tool in a Agent.\nSee [this LlamaIndex tutorial][1] for examples.\n\n[1]: https://gpt-index.readthedocs.io/en/stable/examples/index_structs/knowledge_graph/KnowledgeGraphIndex_vs_VectorStoreIndex_vs_CustomIndex_combined.html#load-data-from-wikipedia\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "llama-index tools wikipedia integration",
    "version": "0.2.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "64c481a6174f312ede20b0c97d6c20f70184be1baed5ea365d0c804c25bc844f",
                "md5": "13a74ca2cd466ce46c6a1b8f3b71fac6",
                "sha256": "d2a44ffeedd44fca00fe76fa074acd0c231e3a2d50d7ad81bbc2be7d44de8d75"
            },
            "downloads": -1,
            "filename": "llama_index_tools_wikipedia-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "13a74ca2cd466ce46c6a1b8f3b71fac6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8.1",
            "size": 2717,
            "upload_time": "2024-08-22T03:25:17",
            "upload_time_iso_8601": "2024-08-22T03:25:17.901500Z",
            "url": "https://files.pythonhosted.org/packages/64/c4/81a6174f312ede20b0c97d6c20f70184be1baed5ea365d0c804c25bc844f/llama_index_tools_wikipedia-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a5599c87dd9fe337c77b8c3c46ff1c10efcd97502ddc834e4828af20e0e0c42d",
                "md5": "e37bf3e63075cabffb5bfde8c072f83c",
                "sha256": "73546e72c07ef33551e0bfe131bb1a42969469d6a1dd76e05a23774dbcf1514a"
            },
            "downloads": -1,
            "filename": "llama_index_tools_wikipedia-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e37bf3e63075cabffb5bfde8c072f83c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8.1",
            "size": 2490,
            "upload_time": "2024-08-22T03:25:19",
            "upload_time_iso_8601": "2024-08-22T03:25:19.227809Z",
            "url": "https://files.pythonhosted.org/packages/a5/59/9c87dd9fe337c77b8c3c46ff1c10efcd97502ddc834e4828af20e0e0c42d/llama_index_tools_wikipedia-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-22 03:25:19",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "llama-index-tools-wikipedia"
}
        
Elapsed time: 0.35498s