RetrievalEvaluatorContext constructor

RetrievalEvaluatorContext({
  1. List<String>? retrievedContextChunks,
})

Creates a RetrievalEvaluatorContext from retrievedContextChunks.

Implementation

RetrievalEvaluatorContext({List<String>? retrievedContextChunks})
    : retrievedContextChunks =
          List.unmodifiable(retrievedContextChunks ?? const []),
      super(
        retrievedContextChunksContextName,
        contents: [
          for (final c in retrievedContextChunks ?? const <String>[])
            TextContent(c),
        ],
      );