| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Rigging is a lightweight LLM framework built on Pydantic XML. The goal is to make leveraging language models in production code as simple and effective as possible. Here are the highlights:
import rigging as rg
@rg.prompt(generator_id="gpt-4")
async def get_authors(count: int = 3) -> list[str]:
"""Provide famous authors."""
print(await get_authors())
# ['William Shakespeare', 'J.K. Rowling', 'Jane Austen']Rigging is built by dreadnode where we use it daily.
We publish every version to Pypi:
pip install riggingIf you want to build from source:
cd rigging/
poetry installRigging will run just about any language model:
Pass the api_key in an generator id or use standard environment variables.
rg.get_generator("gpt-4-turbo,api_key=...")export OPENAI_API_KEY=...
export MISTRAL_API_KEY=...
export ANTHROPIC_API_KEY=...
...Check out the docs for more.
Check out the guide in the docs
import rigging as rg
# 1 - Get a generator
generator = rg.get_generator("claude-3-sonnet-20240229")
# 2 - Build a chat pipeline
pipeline = generator.chat([
{"role": "system", "content": "Talk like a pirate."},
{"role": "user", "content": "Say hello!"},
])
# 3 - Run the pipeline
chat = await pipeline.run()
print(chat.conversation)
# [system]: Talk like a pirate.
# [user]: Say hello!
# [assistant]: Ahoy, matey! Here be the salty sea dog ready to trade greetings wit' ye. Arrr!Want more?
rigging.dreadnode.io has everything you need.
| Back | FazBrowse Home | New Git URL |