Tool plugin for zk-rag to search Wikipedia
Project description
zk-rag-wikipedia Plugin
A plugin for zk-rag that enables Wikipedia content lookup functionality.
Description
This plugin provides a tool to search and retrieve content from Wikipedia articles. It can be used to enhance your RAG (Retrieval-Augmented Generation) applications with Wikipedia knowledge.
Features
- Search Wikipedia articles
- Retrieve article summaries
- Handle disambiguation pages
- Comprehensive error handling
Installation
pip install zk-rag-wikipedia
Usage
The plugin will be automatically discovered by zk-rag when installed. It provides the LookUpTopicOnWikipedia tool which can be used to retrieve information about specific topics from Wikipedia.
Example usage through zk-rag:
from zk_rag import get_tool
wikipedia_tool = get_tool("wikipedia")
result = wikipedia_tool.run("Python programming language")
print(result.title) # The article title
print(result.content) # The article summary
print(result.url) # The Wikipedia URL
Requirements
- Python >= 3.11
- mojentic
- wikipedia
Local Development
To set up this project for local development:
-
Clone the repository:
git clone https://github.com/yourusername/zk-rag-wikipedia.git cd zk-rag-wikipedia
-
Create and activate a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows, use: .venv\Scripts\activate
-
Install development dependencies:
pip install -r requirements.txt pip install -r dev-requirements.txt
-
Install the package in editable mode:
pip install -e .
Building Locally
To build the package locally:
-
Ensure you have the build dependencies:
pip install build
-
Build the package:
python -m build
This will create both wheel and source distribution in the dist/ directory.
Running Tests
To run the tests:
pytest
License
MIT License
Author
Stacey Vetzal (stacey@vetzal.com)
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 zk_rag_wikipedia-1.0.2.tar.gz.
File metadata
- Download URL: zk_rag_wikipedia-1.0.2.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d665f9be6d6ceb7be649622cd12f179a89f207ea09f78b8a240122a4b22a36e
|
|
| MD5 |
36bd220bcaf76425e67138880ecc0c35
|
|
| BLAKE2b-256 |
e343d00fabbfc13b28ad87f7ac272113d2f27006a5d7f3d0fc707ee9ab609e6a
|
Provenance
The following attestation bundles were made for zk_rag_wikipedia-1.0.2.tar.gz:
Publisher:
python-publish.yml on svetzal/zk-rag-wikipedia
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zk_rag_wikipedia-1.0.2.tar.gz -
Subject digest:
6d665f9be6d6ceb7be649622cd12f179a89f207ea09f78b8a240122a4b22a36e - Sigstore transparency entry: 179472852
- Sigstore integration time:
-
Permalink:
svetzal/zk-rag-wikipedia@2a58f3b9526fbfa56a6dd8e49b0c448378d27a24 -
Branch / Tag:
refs/tags/RELEASE-1.0.2 - Owner: https://github.com/svetzal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@2a58f3b9526fbfa56a6dd8e49b0c448378d27a24 -
Trigger Event:
release
-
Statement type:
File details
Details for the file zk_rag_wikipedia-1.0.2-py3-none-any.whl.
File metadata
- Download URL: zk_rag_wikipedia-1.0.2-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c8f9318d06c17655e385277ea9b60e7c00d2015194b017324f3d3675c8bf119
|
|
| MD5 |
fbe7a6678c1b520eeaab9150940ee38e
|
|
| BLAKE2b-256 |
d0b8c4495812ab4ceab9ff955e78274084e87ec27b821195cfb118859aea81b0
|
Provenance
The following attestation bundles were made for zk_rag_wikipedia-1.0.2-py3-none-any.whl:
Publisher:
python-publish.yml on svetzal/zk-rag-wikipedia
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zk_rag_wikipedia-1.0.2-py3-none-any.whl -
Subject digest:
7c8f9318d06c17655e385277ea9b60e7c00d2015194b017324f3d3675c8bf119 - Sigstore transparency entry: 179472855
- Sigstore integration time:
-
Permalink:
svetzal/zk-rag-wikipedia@2a58f3b9526fbfa56a6dd8e49b0c448378d27a24 -
Branch / Tag:
refs/tags/RELEASE-1.0.2 - Owner: https://github.com/svetzal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@2a58f3b9526fbfa56a6dd8e49b0c448378d27a24 -
Trigger Event:
release
-
Statement type: