RagPassage class

A passage given to the LLM, with the citation id the model uses.

Constructors

RagPassage({required String id, required String text, int? sourceId, String? sourceName, int? chunkId, double? score})
const
RagPassage.fromLlmJson(Map<String, Object?> json)
Builds a passage from one entry of RagSearchResult.toLlmJson.
factory

Properties

chunkId → int?
Chunk the passage came from.
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
Citation label, such as "1", cited in the answer as [1].
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
score → double?
Relevance relative to the best passage (1.0).
final
sourceId → int?
Source of the passage, for example for getSourceDocument. Null when the search returned only assembled context.
final
sourceName → String?
The name given to addDocument, when known.
final
text → String
Passage text.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited