GuardrailResult

org.llm4s.agent.guardrails.GuardrailResult
See theGuardrailResult companion trait

Attributes

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

Members list

Type members

Classlikes

final case class Blocked(violations: Seq[String]) extends GuardrailResult[Nothing]

Validation failed and processing should stop.

Validation failed and processing should stop.

Value parameters

violations

Description of the violations that caused the block

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait GuardrailResult[Nothing]
class Object
trait Matchable
class Any
Show all
final case class Fixed[A](original: A, fixed: A, violations: Seq[String]) extends GuardrailResult[A]

Violation was automatically fixed.

Violation was automatically fixed.

Value parameters

fixed

The fixed value

original

The original value before fix

violations

Description of what was fixed

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait GuardrailResult[A]
class Object
trait Matchable
class Any
Show all
final implicit class GuardrailResultOps[A](result: GuardrailResult[A]) extends AnyVal

Get the value if available (Passed, Fixed, or Warned).

Get the value if available (Passed, Fixed, or Warned).

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
final case class Passed[A](value: A) extends GuardrailResult[A]

Validation passed without any issues.

Validation passed without any issues.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait GuardrailResult[A]
class Object
trait Matchable
class Any
Show all
final case class Warned[A](value: A, violations: Seq[String]) extends GuardrailResult[A]

Violation was detected but processing continues (warn mode).

Violation was detected but processing continues (warn mode).

Value parameters

value

The original value (unchanged)

violations

Description of the violations

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait GuardrailResult[A]
class Object
trait Matchable
class Any
Show all

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Implicits

Implicits

final implicit def GuardrailResultOps[A](result: GuardrailResult[A]): GuardrailResultOps[A]

Get the value if available (Passed, Fixed, or Warned).

Get the value if available (Passed, Fixed, or Warned).

Attributes