FakeEmbeddings class

Fake embeddings model for testing.

By default, the embeddings are deterministic (the same text will always have the same embedding vector). You can change this behavior by setting deterministic to false.

Implemented types

Constructors

FakeEmbeddings({int size = 10, bool deterministic = true})
Fake embeddings model for testing.

Properties

deterministic bool
Whether the embedding vector is deterministic.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size int
The size of the embedding vector.
final

Methods

embedDocuments(List<Document> documents) Future<List<List<double>>>
Embed search docs.
override
embedQuery(String query) Future<List<double>>
Embed query text.
override
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