Metadata-Version: 2.1
Name: rigging
Version: 1.1.2
Summary: LLM Interaction Framework
Home-page: https://github.com/dreadnode/rigging
License: MIT
Author: Nick Landers
Author-email: monoxgas@gmail.com
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Provides-Extra: all
Provides-Extra: examples
Requires-Dist: accelerate (>=0.30.1,<0.31.0) ; extra == "all"
Requires-Dist: asyncssh (==2.14.2) ; extra == "examples" or extra == "all"
Requires-Dist: eval-type-backport (>=0.2.0,<0.3.0)
Requires-Dist: litellm (==1.35.21)
Requires-Dist: loguru (>=0.7.2,<0.8.0)
Requires-Dist: pandas (>=2.2.2,<3.0.0)
Requires-Dist: pydantic (==2.6.1)
Requires-Dist: pydantic-xml (==2.11.0)
Requires-Dist: transformers (>=4.41.0,<5.0.0) ; extra == "all"
Requires-Dist: types-requests (==2.32.0.20240523) ; extra == "examples" or extra == "all"
Requires-Dist: vllm (==0.4.2) ; extra == "all"
Project-URL: Repository, https://github.com/dreadnode/rigging
Description-Content-Type: text/markdown

# Rigging

Rigging is a lightweight LLM interaction framework built on Pydantic XML. The goal is to make leveraging LLMs in production pipelines as simple and effictive as possible. Here are the highlights:

- **Structured Pydantic models** can be used interchangably with unstructured text output.
- LiteLLM as the default generator giving you **instant access to a huge array of models**.
- Add easy **tool calling** abilities to models which don't natively support it.
- Store different models and configs as **simple connection strings** just like databases.
- Chat templating, forking, continuations, generation parameter overloads, stripping segments, etc.
- Modern python with type hints, async support, pydantic validation, serialization, etc.

```py
import rigging as rg
from rigging.model import CommaDelimitedAnswer as Answer

chat = rg.get_generator('gpt-4') \
    .chat(f"Give me 3 famous authors between {Answer.xml_tags()} tags.") \
    .until_parsed_as(Answer) \
    .run()

answer = chat.last.parse(Answer)
print(answer.items)

# ['J. R. R. Tolkien', 'Stephen King', 'George Orwell']
```

Rigging is built and maintained by [dreadnode](https://dreadnode.io) where we use it daily for our work.

## Installation
We publish every version to Pypi:
```bash
pip install rigging
```

If you want to build from source:
```bash
cd rigging/
poetry install
```

## Getting Started

Head over to **[our documentation](https://rigging.dreadnode.io)** for more information.
