MiddlewareRef

org.llm4s.agent.graph.middleware.MiddlewareRef
See theMiddlewareRef companion object
@Experimental
final case class MiddlewareRef

Names the middleware an ordering constraint is about (AgentMiddleware.runsBefore, AgentMiddleware.runsAfter): the one with an id, MiddlewareRef(id), or every middleware of a type, MiddlewareRef.ofType[GuardrailMiddleware] (#2795). Name another middleware by its type when you can: its id is its user's to choose.

A reference is required unless it is made optional with ifPresent: a required one that matches nothing in the stack is refused, so a mistyped id cannot silently leave an order unarranged; an optional one applies when the other is there and is ignored when it is not, which is how a reusable middleware says "outside the guardrails, if there are any".

Attributes

Companion
object
Source
AgentMiddleware.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

This reference, applied only when the stack has the middleware it names; no error when it has none.

This reference, applied only when the stack has the middleware it names; no error when it has none.

Attributes

Source
AgentMiddleware.scala
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
Source
AgentMiddleware.scala

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product