dreadnode/rigging
Lightweight LLM Interaction Framework
What it solves
Rigging 簡化了大型語言模型(LLM)在生產程式碼中的整合。它移除管理不同模型供應商、處理結構化資料以及建構複雜聊天管線所需的樣板程式碼,讓在軟體中使用 AI 的流程更有效率且可預測。
How it works
Rigging 作為一個輕量級框架,利用 LiteLLM、vLLM 與 transformers 提供統一的介面,支援多種模型。它允許開發者以 Python 函式搭配型別提示與 docstring 來定義提示,並使用 Pydantic 模型進行結構化輸出驗證。模型設定透過類似資料庫連線字串的 connection strings 進行管理,並支援高併發的 async batching 產生。
Who it’s for
需要彈性、型別安全且可投入生產的函式庫,以管理提示、工具使用與模型切換的 AI 代理或 LLM 驅動應用開發者。
Highlights
- Unified Model Access: Instant access to numerous models via LiteLLM, vLLM, and transformers.
- Structured Data: Seamlessly switch between unstructured text and Pydantic models for validated output.
- Prompt Engineering: Define prompts as Python functions with built-in type hints.
- Production Tooling: Integrated tracing with Logfire, async batching, and serialization support.
- Flexible Tool Use: Simple tool integration, even for models that do not natively support tool-calling APIs.