No project description provided
Project description
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.
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
Built Distribution
File details
Details for the file instructprompt-0.1.5.tar.gz
.
File metadata
- Download URL: instructprompt-0.1.5.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.3 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cc0aad4babcdcc85b5269d8446b22a3dd9fe1424189cf8df23f745949537dcb |
|
MD5 | fdeb8ee716deb03b1dbb17e6181712f5 |
|
BLAKE2b-256 | 10929e3da1772a3e649601c4a6deb58b44d4f0caf7f46dc2e9aabcb0f5ac44d9 |
File details
Details for the file instructprompt-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: instructprompt-0.1.5-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.3 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77ade5c0d17f1b1340692904587414dd47fdf9d597509600e88f98a88f170933 |
|
MD5 | ab5627d5917e597fd6571b6e6dbf57bf |
|
BLAKE2b-256 | a04c374720bf1abff0d66045e4de74658d90eb2a2f08d8a1862db1cbc3729a74 |