Metadata-Version: 2.1
Name: instructprompt
Version: 0.1.2
Summary: 
Author: krrishdholakia
Author-email: krrishdholakia@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: chromadb (>=0.3.25,<0.4.0)
Description-Content-Type: text/markdown

# 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_instructions()`, and `query_instructions()`.

### 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_instructions()

The `list_instructions()` function returns a list of all the stored instructions in the collection. 

```
import InstructPrompt

instructions = InstructPrompt.list_instructions()
print(instructions) # Outputs a list of all the stored instructions
```

### query_instructions()

The `query_instructions()` 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_instructions(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](https://github.com/instructprompt/readme/blob/master/LICENSE).
