LLMToneGuardrail

org.llm4s.agent.guardrails.builtin.LLMToneGuardrail
See theLLMToneGuardrail companion class

Attributes

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

Members list

Value members

Concrete methods

def apply(client: LLMClient, allowedTones: Set[String], threshold: Double): LLMToneGuardrail

Builds a tone guardrail for a set of tones.

Builds a tone guardrail for a set of tones.

Value parameters

allowedTones

the acceptable tones

client

the client that makes the judge call

threshold

the lowest score that passes (default 0.7)

Attributes

def friendly(client: LLMClient, threshold: Double): LLMToneGuardrail

Builds a guardrail for the tones friendly, warm and approachable.

Builds a guardrail for the tones friendly, warm and approachable.

Value parameters

client

the client that makes the judge call

threshold

the lowest score that passes (default 0.7)

Attributes

def professional(client: LLMClient, threshold: Double): LLMToneGuardrail

Builds a guardrail for the tones professional, formal and business-appropriate.

Builds a guardrail for the tones professional, formal and business-appropriate.

Value parameters

client

the client that makes the judge call

threshold

the lowest score that passes (default 0.7)

Attributes

def professionalOrFriendly(client: LLMClient, threshold: Double): LLMToneGuardrail

Builds a guardrail for the tones professional, friendly, warm and approachable.

Builds a guardrail for the tones professional, friendly, warm and approachable.

Value parameters

client

the client that makes the judge call

threshold

the lowest score that passes (default 0.7)

Attributes