Python client for colbertdb
Project description
Colbertdb Python Client
This is a Python client for ColBERTdb. It provides a simple interface for managing collections and documents, and for performing searches within collections.
Features
- Create and manage collections: Easily create new collections and manage existing ones.
- Add and delete documents: Add new documents to collections and delete existing ones.
- Search collections: Perform search queries on collections and retrieve relevant documents.
Installation
pip install pycolbertdb
Usage
from colbertdb.client import Colbertdb
from llama_index.readers.web import SimpleWebPageReader
client = Colbertdb(url="http://localhost:8080")
client.connect()
docs = SimpleWebPageReader(html_to_text=True).load_data(
["https://www.radar.com/documentation/api"]
)
docs = [{"content": doc.text, "metadata": {"source": doc.id_}} for doc in docs]
collection = colbertdb.create_collection(collection_name, documents=docs)
response = collection.search(query="How do I add a geofence?", k=3)
print(response)
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
pycolbertdb-0.2.1.tar.gz
(4.6 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 pycolbertdb-0.2.1.tar.gz.
File metadata
- Download URL: pycolbertdb-0.2.1.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.1 Linux/6.5.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0aaa3ba15c22d5a16c2833f4ce822e59723137df40822b8bc643c7fdfa66da8f
|
|
| MD5 |
86ee733022d886c650a269c933d28216
|
|
| BLAKE2b-256 |
0523cc9da85b9de60292d84d7855d89b35b63ef55454b0671da1ed802e41c05c
|
File details
Details for the file pycolbertdb-0.2.1-py3-none-any.whl.
File metadata
- Download URL: pycolbertdb-0.2.1-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.1 Linux/6.5.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a464cd8750fd44a4608303f13199e3480c0a114e04973cb3ca0104b4e9f7650d
|
|
| MD5 |
6f9ea5ce69d0498a93117e86c3570bd5
|
|
| BLAKE2b-256 |
aebc616619c0ff640f835ab79bc19db03c37cc21b898a40f10b413f725707373
|