dreadnode/rigging — reverse-engineered prompt
Reverse engineered prompt
Build me a lightweight Python library for working with language models in real apps. I want it to make prompts feel like normal Python functions, so I can write a typed async function with a docstring and get back either plain text or validated structured data.
It should support lots of different model providers through simple connection strings, let me pass API keys from environment variables, and make it easy to start a chat, continue it, fork it, or run raw completions. I also want simple tool calling, even when the model provider doesn’t have native tool support.
Please include examples for a basic chat, structured output, batching many requests, using tools, and saving or reloading conversations. Add good docs and tests so someone can install it with pip or work on it from source. Use modern Python with type hints, async support, Pydantic validation, and clean error handling. Look up current provider docs online if you need to.
Want more depth? Deep Reverse