llama-index-tools-wikipedia


Namellama-index-tools-wikipedia JSON
Version 0.3.0 PyPI version JSON
download
home_pageNone
Summaryllama-index tools wikipedia integration
upload_time2024-11-17 23:03:41
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.
            # 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.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Your Name",
    "author_email": "you@example.com",
    "download_url": "https://files.pythonhosted.org/packages/86/fc/0ebe0913694a3582c0ae2c96cafb48689a9d012766e5b8a32d59932009de/llama_index_tools_wikipedia-0.3.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.3.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "60890d7aa9a41ed0a0768790da770ef057416b81a92ecc35dc9f9d70a86abbb1",
                "md5": "0a0384aa98cd835cf3565a5d6a57a07f",
                "sha256": "aa76c39237056b3ed727a23aadc65f34c5b500449ee9ec2efaced055f3ff9938"
            },
            "downloads": -1,
            "filename": "llama_index_tools_wikipedia-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0a0384aa98cd835cf3565a5d6a57a07f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 2712,
            "upload_time": "2024-11-17T23:03:39",
            "upload_time_iso_8601": "2024-11-17T23:03:39.546042Z",
            "url": "https://files.pythonhosted.org/packages/60/89/0d7aa9a41ed0a0768790da770ef057416b81a92ecc35dc9f9d70a86abbb1/llama_index_tools_wikipedia-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "86fc0ebe0913694a3582c0ae2c96cafb48689a9d012766e5b8a32d59932009de",
                "md5": "9ec663a9b8bc974506c6dccc3b0d4825",
                "sha256": "8e3fc5ae8a479aacc6640c6c30a66f9848762bf8ebbbc4ceab41e8a4762a664c"
            },
            "downloads": -1,
            "filename": "llama_index_tools_wikipedia-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9ec663a9b8bc974506c6dccc3b0d4825",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 2487,
            "upload_time": "2024-11-17T23:03:41",
            "upload_time_iso_8601": "2024-11-17T23:03:41.119666Z",
            "url": "https://files.pythonhosted.org/packages/86/fc/0ebe0913694a3582c0ae2c96cafb48689a9d012766e5b8a32d59932009de/llama_index_tools_wikipedia-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-17 23:03:41",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "llama-index-tools-wikipedia"
}
        
Elapsed time: 1.48634s