LLM Interaction Framework
Project description
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.
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 where we use it daily for our work.
Installation
We publish every version to Pypi:
pip install rigging
If you want to build from source:
cd rigging/
poetry install
Getting Started
Head over to our documentation for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rigging-1.0.1.tar.gz
(32.8 kB
view hashes)
Built Distribution
rigging-1.0.1-py3-none-any.whl
(37.4 kB
view hashes)