AnyGuardrail
AnyGuardrail
any_guardrail.api.AnyGuardrail
Factory class for creating guardrail instances.
Source code in src/any_guardrail/api.py
create(guardrail_name, **kwargs)
classmethod
Create a guardrail instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
guardrail_name
|
GuardrailName
|
The name of the guardrail to use. |
required |
**kwargs
|
Any
|
Additional keyword arguments to pass to the guardrail constructor. |
{}
|
Returns:
Type | Description |
---|---|
Guardrail
|
A guardrail instance. |
Source code in src/any_guardrail/api.py
get_all_supported_models()
classmethod
Get all model IDs supported by all guardrails.
Source code in src/any_guardrail/api.py
get_supported_guardrails()
classmethod
get_supported_model(guardrail_name)
classmethod
Get the model IDs supported by a specific guardrail.