Skip to main content

**PurrfectKit** is a Python library for effortless Retrieval-Augmented Generation (RAG) workflows.

Project description

PurrfectMeow Logo

PurrfectKit

Python 3.10–3.13 PyPI Downloads codecov Ruff Docker License

PurrfectKit is a toolkit that simplifies Retrieval-Augmented Generation (RAG) into 5 easy steps:

  1. Suphalak - read content from files
  2. Malet - split content into chunks
  3. WichienMaat - embed chunks into vectors
  4. KhaoManee - search vectors with queries
  5. Kornja - generate answers from vectors

NOTE: Each step is inspired by a unique Thai cat breed, making the workflow memorable and fun.

Quickstart

Prerequisites

  • python
  • tesseract

Installation

pip install purrfectkit

Usage

from purrfectmeow.meow.felis import DocTemplate, MetaFile
from purrfectmeow import Suphalak, Malet, WichienMaat, KhaoManee

file_path = 'test/test.pdf'
metadata = MetaFile.get_metadata(file_path)
with open(file_path, 'rb') as f:
    content = Suphalak.reading(f, 'test.pdf')
chunks = Malet.chunking(content, chunk_method='token', chunk_size='500', chunk_overlap='25')
docs = DocTemplate.create_template(chunks, metadata)
embedding = WichienMaat.embedding(chunks)
query = WichienMaat.embedding("ทดสอบ")
KhaoManee.searching(query, embedding, docs, 2)

License

PurrfectKit is released under the MIT License.

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

purrfectkit-0.2.3.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

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

purrfectkit-0.2.3-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file purrfectkit-0.2.3.tar.gz.

File metadata

  • Download URL: purrfectkit-0.2.3.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.8

File hashes

Hashes for purrfectkit-0.2.3.tar.gz
Algorithm Hash digest
SHA256 8834ca7702bbc1301fb87d23cb90aa4db77375ae239621967e11845b926a8f2e
MD5 48107cb659c06409d8391b5368ad595c
BLAKE2b-256 4151252d4019660a63ae11c6a3b958276a5cfe42f3ea1080679f923833b8c5e4

See more details on using hashes here.

File details

Details for the file purrfectkit-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for purrfectkit-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 188e316f2c5d47d632d8daa72ce67b01ea4c62cd9219335dec5cf3290803988e
MD5 b4eb10ba8d329ebb118684ca0576672a
BLAKE2b-256 8d3b5da4f6ca587a6e919fba51940adeb4ae1d6684063cb1bfc5142f7b3d57c5

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