Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Reason given by maintainers: critical bug

PromptCache

A simple-to-use prompt caching optmized for simplicity and speed.

Installation

pip install promptcache

Quickstart

from promptcache import RedisCache

>>> cache = RedisCache()
>>> cache.set("this is a prompt", "this is the completion")
>>> cache.search("this is a prompt")
{'completion': 'this is the completion', 'prompt': 'this is a prompt', 'distance': 0}

>>> cache.search("this is a prompt prompt prompt")
{'completion': 'this is the completion', 'prompt': 'this is a prompt', 'distance': 0.1254}

>>> cache.get("this is a prompt")
'this is the completion'

>>> cache.delete("this is a prompt")
>>> cache.get("this is a prompt")
None 

Features

  1. Simplicity, speed and scalability using redis
  2. Fast embedding base on fastembed
  3. Insturction embedding based on InstructorEmbedding

Metadata

Release files for promptcache 0.0.1a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for promptcache 0.0.1a1
File Size Uploaded Provenance Actions
promptcache-0.0.1a1.tar.gz 9.6 kB Without provenance Details for promptcache-0.0.1a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for promptcache 0.0.1a1
File Interpreter ABI Platform Actions
promptcache-0.0.1a1-py3-none-any.whl Python 3 none any Details for promptcache-0.0.1a1-py3-none-any.whl

Total release size: 20.3 kB

Release files / promptcache-0.0.1a1.tar.gz

Download URL promptcache-0.0.1a1.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a285080b9e9aafff29a50a36529f78dde8a9e66ba9de99cdea0f01decc3b16ec
BLAKE2b-256 checksum
How to use checksums
83c3164473d9e2595e42e12a117f49dff29724ea150ff3817b2cf9174b99ffe5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.4 Darwin/23.0.0

Release files / promptcache-0.0.1a1-py3-none-any.whl

Download URL promptcache-0.0.1a1-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e3d95bed856d7bd4b89e2eaf36a6fc3dce5c53ee7ca9dfbfb2c0c2aa4dfe1ef1
BLAKE2b-256 checksum
How to use checksums
a3a1af9fde47028778b71816fcef161a48b40656ec5abf091243f350dc567f44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.4 Darwin/23.0.0

Security for promptcache 0.0.1a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1a1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page