semvec/pypi-packages huggingface dataset:
prompt-functions 0.1.27
Build semantic functions.
License: MIT
Requires Python: >=3.9,<4.0

# Prompt Functions ⚙️
`prompt-functions` aims to make it easy to build functions with LLMs that have structured I/O, and to move prompts out of the code into serialized and versioned formats.


## Getting Started
### 1. Installation
Install the package using pip:
```bash
pip install prompt-functions
```
### 2. Setting Up Your First Function
Let's create a sentiment classification function:

**Step 1**: Create a directory named sentiment. Inside this directory, you need two files:
```bash
└─ sentiment
   ├── function_args.json
   ├── model_args.json
   └── template.txt
```
**Step 2:** Define your prompt template in template.txt:
```bash
Aalyze and determine whether the sentiment of the following sentence is positive, negative, or neutral.
Sentence:
{sentence}
```
**Step 3:** Set model paramters in model_args.json:
```json
{
    "temperature": 0.0,
    "model": "gpt-3.5-turbo"
}
```

**Step 4:** Specify the function's output format in function_args.json:
```json
{
    "function_name": "sentiment_classifier",
    "description": "Classify the sentiment of a sentence",
    "properties": {
        "thoughts": {
            "type": "string",
            "description": "Your thoughts when classifying sentiment of the given sentence."
        },
        "sentiment": {
            "type": "string",
            "enum": ["positive", "negative", "neutral"],
            "description": "The sentiment of the given sentence."
        }
    }
}
```
### 3. Using Your Prompt Function in Python

Here's how you can load and use your prompt function:

```python
from prompt_functions import PromptFunction

# Load your function
sentiment = PromptFunction.from_dir("./sentiment/")

# Make a prediction
pred = sentiment(sentence="I am super happy!")

# Expected Output:
# {
#   "thoughts": "The sentiment in the sentence is positive",
#   "sentiment": "positive"
# }
```
## Prompt Versioning
*Coming up..*
statsplot 2.3.3
A package for most important plot for (biological)-sciences
License: MIT
Keywords: plotting

[![Latest Version on PyPI](https://img.shields.io/pypi/v/statsplot.svg)](https://pypi.python.org/pypi/statsplot/)

# Statsplot

A package that allows you easily to calculate and plot statistics.

 Seaborn                   |  Statsplot
:-------------------------:|:-------------------------:
![boxplot seaborn](https://github.com/SilasK/statsplot/blob/master/docs/images/nested_seaborn.png) |  ![boxplot statsplot](https://github.com/SilasK/statsplot/blob/master/docs/images/nested_statsplot.png)




> 
<!-- 

[![Supported Implementations](https://img.shields.io/pypi/pyversions/statsplot.svg)](https://pypi.python.org/pypi/statsplot/)
[![Build Status](https://secure.travis-ci.org/silask/statsplot.svg?branch=master)](http://travis-ci.org/christophevg/statsplot)
[![Documentation Status](https://readthedocs.org/projects/statsplot/badge/?version=latest)](https://statsplot.readthedocs.io/en/latest/?badge=latest)
[![Coverage Status](https://coveralls.io/repos/github/silask/statsplot/badge.svg?branch=master)](https://coveralls.io/github/silask/statsplot?branch=master)
[![Built with PyPi Template](https://img.shields.io/badge/PyPi_Template-v0.1.4-blue.svg)](https://github.com/christophevg/pypi-template)



## Documentation

Visit [Read the Docs](https://statsplot.readthedocs.org) for the full documentation, including overviews and several examples.

 -->

 Setup :

 ```
 pip install statsplot
 ```

 Setup dev version:

```
git clone ...
cd statsplot
pip install --editable .

```


See the [Example](https://github.com/SilasK/statsplot/blob/master/example.ipynb) or run it on [Colab](https://colab.research.google.com/github/SilasK/statsplot/blob/master/example.ipynb)