Unified RAG service abstraction for vector stores like Qdrant.
Project description
RAGpy
Usage
Create a vectorstore client (currently only Qdrant is supported). Set QDRANT_API_KEY environment variable first.
from ragpy.vectorstore import QdrantService
from ragpy.embeddings import OpenAIEmbeddingService
embedder = OpenAIEmbeddingService(api_key="your-openai-key")
qdrant = QdrantService("https://your-qdrant-server-url", embedder=embedder)
Create collection:
qdrant.create_collection('collection-name')
Upload chunks of data to a collection:
chunks = ['list of', 'text chunks']
qdrant.upsert('collection-name', chunks)
Query collection:
query_points = qdrant.search('collection-name', 'your query')
for point in query_points:
print(f'score: {point["score"]}')
print(f'text: {point["text"]}')
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
ragpy-0.1.0.tar.gz
(113.5 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
ragpy-0.1.0-py3-none-any.whl
(4.1 kB
view details)
File details
Details for the file ragpy-0.1.0.tar.gz.
File metadata
- Download URL: ragpy-0.1.0.tar.gz
- Upload date:
- Size: 113.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1eb3fb57730361314ac7586e56bbab94ec1d90ab13f7be1efacd3d5c901e49d6
|
|
| MD5 |
74cb3b7cd0a913e8f6a12e5d3599cf93
|
|
| BLAKE2b-256 |
8eae1eb93788dd017658297a580e659be15bb019d95aa6f74cb64878751e0ff3
|
File details
Details for the file ragpy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ragpy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
425bfc8ab2f78efda2f250b49c42df8198e947c715e7e1ea648f7db4f1846d45
|
|
| MD5 |
813a5aa8787679009bb272008a85cfbe
|
|
| BLAKE2b-256 |
b114a36a68f33bbcfa6ae90e4ab704a893d62b8382ad36012b9bf94e565c7e55
|