OmegaEngine governance integration for dspy-omega
Project description
dspy-omega
DSPy Integration for OmegaEngine
✨ Features
- 🧠 Programmatic Prompting — Govern DSPy modules
- 📊 Signature Validation — Validate input/output signatures
- 🔄 Optimizer Governance — Control optimization runs
- 📈 Trace Logging — Full audit of DSPy pipelines
- 🛡️ Module Wrappers — Governance for any DSPy module
📦 Installation
pip install dspy-omega
🚀 Quick Start
import dspy
from dspy_omega import OmegaModule, configure_omega
# Configure governance
configure_omega(
api_key="your-omega-key",
policy_id="dspy_policy",
)
class RAG(dspy.Module):
def __init__(self):
self.retrieve = dspy.Retrieve(k=3)
self.generate = dspy.ChainOfThought("context, question -> answer")
def forward(self, question):
context = self.retrieve(question).passages
return self.generate(context=context, question=question)
# Wrap with governance
governed_rag = OmegaModule(RAG())
# All module calls are governed
result = governed_rag(question="What is AI safety?")
print(result.answer)
print(result.omega_audit_id)
🔄 Optimizer Governance
from dspy_omega import governed_optimizer
# Control optimization runs
optimizer = governed_optimizer(
dspy.MIPROv2(),
omega_api_key="...",
max_unsafe_retries=3,
)
📄 License
Licensed under the Apache License 2.0.
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
dspy_omega-0.2.0.tar.gz
(561.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dspy_omega-0.2.0.tar.gz.
File metadata
- Download URL: dspy_omega-0.2.0.tar.gz
- Upload date:
- Size: 561.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e5258dacbc25545542af11dff64a617fff185142d7c1236099b1166e937fe88
|
|
| MD5 |
254757deb54ca6789203e020d6428c20
|
|
| BLAKE2b-256 |
cb6936e065efbe50a84f253e03d24b96fde30cd02619bc01c1b7fa92ae8b5dc8
|
File details
Details for the file dspy_omega-0.2.0-py3-none-any.whl.
File metadata
- Download URL: dspy_omega-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcf54b7fe6cf160dc3858ad0d84bd131535bcef1a277c0524ac7037d07873ecf
|
|
| MD5 |
b41994d101158917483ee54b43e86e65
|
|
| BLAKE2b-256 |
e9f03b1049392efce1e285c6a3be9cb6da031b0add1161507abcb8e447284305
|