EvaluationContext constructor

EvaluationContext(
  1. String name, {
  2. List<AIContent>? contents,
  3. String? text,
})

Creates an EvaluationContext with the given name and optional contents.

If text is supplied and contents is null, the context will contain a single TextContent wrapping text.

Implementation

EvaluationContext(
  this.name, {
  List<AIContent>? contents,
  String? text,
}) : contents = contents ?? (text != null ? [TextContent(text)] : []);