TextAndVector class

A class that represents a text and its corresponding embedding.

Note that equality is only based on the text, not the embedding. Two TextAndVector objects could compare as equal even if the embeddings are from different models.

This is chosen to avoid expensive deep equals checks.

Constructors

TextAndVector({required String text, required Vector embedding})

Properties

embedding → Vector
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
text → String
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