Lightweight library for building LLM-based control flow.
Project description
Welcome to Gears
Gears is a lightweight tool 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 are committed to not growing the codebase beyond what is necessary to support the above features. (We are not venture-backed and do not intend to be.)
Installation
Gears is available on PyPI, and can be installed with pip:
pip install gearsllm
Dependencies
Gears has the following dependencies:
python>=3.9
pydantic
jinja2
tenacity
openai
ToDos
- 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.26.tar.gz
(8.3 kB
view hashes)
Built Distribution
Close
Hashes for gearsllm-0.1.26-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d29cbc9e1f3f13a964ac561aa5b834b51bb54a5cccd23100a9d7f9f073124a4d |
|
MD5 | 02a2aa169837e65fcff136d9d4b15697 |
|
BLAKE2b-256 | e76aa14ba597a9e80346f4f321f503dcc95b61908fe4f6b695145ab45f1c0478 |