llama-index tools wikipedia integration
Project description
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
from llama_index.tools.wikipedia import WikipediaToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI
tool_spec = WikipediaToolSpec()
agent = FunctionAgent(
tools=tool_spec.to_tool_list(), llm=OpenAI(model="gpt-4.1")
)
print(await agent.run("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 for examples.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llama_index_tools_wikipedia-0.4.1.tar.gz.
File metadata
- Download URL: llama_index_tools_wikipedia-0.4.1.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a10f486818adbbbce1129f054f7b95de5361cba118367c2078b01347f35812c6
|
|
| MD5 |
0e135f59f77da33390079810190c4b22
|
|
| BLAKE2b-256 |
ba51a9ed3f846ed5bec50dd4371fc1411f2d86466be5dbb78733652805fb522a
|
File details
Details for the file llama_index_tools_wikipedia-0.4.1-py3-none-any.whl.
File metadata
- Download URL: llama_index_tools_wikipedia-0.4.1-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2b879669e8358d41e0baec3d6279721a5b73772717d8e869b20e9c8a4d9b312
|
|
| MD5 |
40a3fa3bba49832624b4e29be7da8353
|
|
| BLAKE2b-256 |
ea835b2bfbfa41e1b5a68c680667f3e7fb406db9dac5ce58b3891a96143f020a
|