InstructPrompt 📝🔍
⚡ A Python package for storing, retrieving, and dynamically creating prompts for GPT models ⚡
Our goal with InstructPrompt is to make it easier to tame large language models and make improving your LLM in production simpler to do. This package allows users to store instructions, which can be retrieved to dynamically create prompts giving gpt instructions on how to respond to a specific user's query.
Getting Started
To get started with InstructPrompt, you will need to first install the library by running the following command:
pip install instructprompt
Once installed, you can import it into your python project by running the following:
import instructprompt
Using InstructPrompt
InstructPrompt provides 3 main functions: add(), list(), and query().
add()
The add() function takes in an instruction as a string and adds it to the collection. It uses ChromaDB to store the instruction and assigns it a unique id. It returns a confirmation message once the instruction is successfully added.
import instructprompt
instruction = "Please provide the customer's name and order number."
instructprompt.add(instruction)
list()
The list() function returns a list of all the stored instructions in the collection.
import instructprompt
instructions = instructprompt.list()
print(instructions) # Outputs a list of all the stored instructions
query()
The query() function takes in a query as a string and returns a list of instructions that match the query. It uses ChromaDB to perform the query and returns up to 5 matching instructions.
import instructprompt
query = "How do I reset my password?"
instructions = instructprompt.query(query)
print(instructions) # Outputs a list of instructions that match the query
Version
The current version of InstructPrompt is 0.1.0.
Contributing
We welcome contributions to InstructPrompt! Feel free to create issues/PR's/or DM us (👋 Hi I'm Krrish - +17708783106)
License
InstructPrompt is released under the MIT License.
Metadata
Release files for instructprompt 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| instructprompt-0.1.5.tar.gz | 2.6 kB | Without provenance | Details for instructprompt-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| instructprompt-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for instructprompt-0.1.5-py3-none-any.whl |
Total release size: 5.8 kB
Release files / instructprompt-0.1.5.tar.gz
| Download URL | instructprompt-0.1.5.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5cc0aad4babcdcc85b5269d8446b22a3dd9fe1424189cf8df23f745949537dcb
|
|
BLAKE2b-256 checksum How to use checksums |
10929e3da1772a3e649601c4a6deb58b44d4f0caf7f46dc2e9aabcb0f5ac44d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.11.3 Darwin/19.6.0
|
Release files / instructprompt-0.1.5-py3-none-any.whl
| Download URL | instructprompt-0.1.5-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
77ade5c0d17f1b1340692904587414dd47fdf9d597509600e88f98a88f170933
|
|
BLAKE2b-256 checksum How to use checksums |
a04c374720bf1abff0d66045e4de74658d90eb2a2f08d8a1862db1cbc3729a74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.11.3 Darwin/19.6.0
|
Security for instructprompt 0.1.5
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.