UsageAccounting
org.llm4s.agent.graph.middleware.UsageAccounting
@Experimental
trait UsageAccounting
What counts the model calls a hook, an admission stage or a guardrail makes itself, so that they are in the thread's usage: a hook's ModelContext, and an admission stage's AdmissionContext (#2854). A guardrail that calls a model is given one (Guardrail.validateIn(value, context)) and calls through accounted, whichever stage runs it.
Attributes
- Source
- ModelContext.scala
- Graph
-
- Supertypes
- Known subtypes
-
class AdmissionContextclass ModelContext
Members list
In this article
