A utility package for Pinecone RAG operations
Project description
Pinecone RAG
A Python package for working with Pinecone in RAG (Retrieval-Augmented Generation) applications.
Installation
pip install pinecone-rag
Usage
from PineconeRag import PineconeRAG
# Initialize the RAG client
rag = PineconeRAG(
api_key="your-api-key", # or set PINECONE_API_KEY env var
index_name="rag-768" # optional, defaults to "rag-768"
)
# Define a callback function (optional)
def process_match(match):
print(f"Found match with score: {match['score']}")
print(f"Text: {match['metadata']['original_text']}")
# Query Pinecone
results = rag.query(
namespace="your-namespace",
text="your query text",
top_k=3,
include_metadata=True, # optional, defaults to True
callback=process_match, # optional callback
debug=True # optional debug mode
)
Publishing to PyPI
python3 -m pip install --upgrade build
python3 -m build
python3 -m twine upload --repository pypi dist/*
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
pineconerag-0.1.3.tar.gz
(1.9 kB
view details)
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 pineconerag-0.1.3.tar.gz.
File metadata
- Download URL: pineconerag-0.1.3.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a6fa9b4f338f8ae7e8b5ace225ea09c95aea5c485fa08dc518391b742cfbf36
|
|
| MD5 |
55a33e1801bffeac8b07487c7cc11872
|
|
| BLAKE2b-256 |
f42a7439a8e9a776f26c143949cc215a671241e1a14be1a7ec1af88257d59e2a
|
File details
Details for the file pineconerag-0.1.3-py3-none-any.whl.
File metadata
- Download URL: pineconerag-0.1.3-py3-none-any.whl
- Upload date:
- Size: 1.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3060431f04a67160b3271a273be715445b58bbf1f0c706d569c4709a7e38befb
|
|
| MD5 |
c222c5371002b12ca4470ac2ba9ce19b
|
|
| BLAKE2b-256 |
091d3f26a99b898c1c768c821f4b6766ee51653f19897655653c8332d43ae572
|