Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_tools_wikipedia-0.5.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_tools_wikipedia-0.5.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_tools_wikipedia-0.5.0.tar.gz.

File metadata

  • Download URL: llama_index_tools_wikipedia-0.5.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_tools_wikipedia-0.5.0.tar.gz
Algorithm Hash digest
SHA256 926cba26d992d2ebcf6681963d32cfd1e58f15acf7352c8bdb35bac228c390b1
MD5 6383b751c8d9a6c1ca9a3fe4c46460ba
BLAKE2b-256 b065f8c56458f9f086adc465aa395132144317338fc77b145b269db66475f379

See more details on using hashes here.

File details

Details for the file llama_index_tools_wikipedia-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: llama_index_tools_wikipedia-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_tools_wikipedia-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd65694cf7d0751417bef968b11d5a0096076e9ffac1e1bab6a09c651145e264
MD5 21600fd11b1d70b746ffd637ffa09165
BLAKE2b-256 64f87355c299776f2bb519c33af2c0b7d5e5c033d93c68fdffee6783b53a61e1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page