Lightweight library for building LLM-based control flow.
Project description
Welcome to Gears
Gears is a lightweight framework for writing control flow with LLMs with full control over your prompts. It allows you to build complex chains of actions and conditions, and execute them in a single call.
Why Gears?
Gears is so minimal; it is simply a wrapper around an LLM API call that:
- Allows you to specify your prompts as Jinja templates and inputs as Pydantic models
- Automatically handles LLM API failures with exponential backoff
- Allows you to specify control flow, based on LLM responses, in a simple, declarative way
But the real selling point is that we will not suffer the bloat of a venture-backed open source project; we are committed to not growing the codebase beyond what is necessary to support the above features.
Installation
Gears is available on PyPI, and can be installed with pip:
pip install gearsllm
ToDos
- Run examples in docs + add outputs
- Add pre-commit hooks with black & isort
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
gearsllm-0.1.18.tar.gz
(7.5 kB
view hashes)
Built Distribution
Close
Hashes for gearsllm-0.1.18-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fdbba7e8b0d4ce9b8f366736e8948aff195231f285d381a35ba418c941a9346 |
|
MD5 | 13842148eb072f41d720a9364d9c9d47 |
|
BLAKE2b-256 | 957cb54e3ec49429f3a859fed0a0678028f53c19b1d837a9a4a53511c022afab |