Class: EvaluateContainer
Defined in: src/lib/logger/components/base.ts:362 Container for configuring and triggering evaluations on containers. Provides an interface for setting up evaluations with variables. Used to assess the quality and performance of different operations for your application. EvaluateContainerExamples
Constructors
Constructor
new EvaluateContainer(Defined in: src/lib/logger/components/base.ts:377 Creates a new evaluation container instance.writer,entity,id):EvaluateContainer
Parameters
writer
LogWriter
The log writer instance for committing evaluations
entity
Entity
The entity type being evaluated
id
string
The unique identifier of the entity being evaluated
Returns
EvaluateContainer
Example
Methods
withEvaluators()
withEvaluators<Defined in: src/lib/logger/components/base.ts:439 Specifies which evaluators should be attached for evaluation to this container.T>(…evaluators):object
Type Parameters
T
T extends string = string
String literal type for evaluator names
Parameters
evaluators
…string[]
Names of evaluators to be used for evaluation once all variables are available to them
Returns
object
withVariables()
withVariables: <U>(variables) =>void
Type Parameters
U
U extends string = T
Parameters
variables
Record<U, string>
Returns
void
Examples
withVariables()
withVariables<Defined in: src/lib/logger/components/base.ts:408 Configures variables for specific evaluators in the evaluation. Variables provide the values needed by the evaluators to execute; such as expected outputs, retrieved contexts, or input queries.T>(variables,forEvaluators):void
Type Parameters
T
T extends string = string
String literal type for variable names
Parameters
variables
Record<T, string>
Key-value pairs mapping variables to their values
forEvaluators
string[]
Array of evaluator names that should receive these variables
Returns
void