geekyrakshit's picture
add: guardrails manager
b077b7d
raw
history blame
267 Bytes
from abc import abstractmethod
import weave
class Guardrail(weave.Model):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@abstractmethod
@weave.op()
def guard(self, prompt: str, **kwargs) -> list[str]:
pass