InputGuardrail

org.llm4s.agent.guardrails.InputGuardrail
See theInputGuardrail companion trait

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def from(guardrail: Guardrail[String]): InputGuardrail

guardrail as an input guardrail, for GuardrailMiddleware: a CompositeGuardrail or any other Guardrail[String] (a cast throws a ClassCastException). Both validate forms delegate, so a guardrail that calls a model through the hook's context keeps doing so, and the name and description are the guardrail's. One that already is an InputGuardrail is returned unchanged.

guardrail as an input guardrail, for GuardrailMiddleware: a CompositeGuardrail or any other Guardrail[String] (a cast throws a ClassCastException). Both validate forms delegate, so a guardrail that calls a model through the hook's context keeps doing so, and the name and description are the guardrail's. One that already is an InputGuardrail is returned unchanged.

Attributes