EmbeddingVector class sealed

The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the embedding guide.

Implementers
Annotations
  • @freezed

Constructors

EmbeddingVector.fromJson(Map<String, dynamic> json)
Object construction from a JSON representation
factory
EmbeddingVector.vector(List<double> value)
The embedding vector as a list of floats.
const
factory
EmbeddingVector.vectorBase64(String value)
The embedding vector as a base64-encoded string.
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value Object
no setterinherited

Methods

map<TResult extends Object?>({required TResult vector(EmbeddingVectorListDouble value), required TResult vectorBase64(EmbeddingVectorString value)}) → TResult
inherited
mapOrNull<TResult extends Object?>({TResult? vector(EmbeddingVectorListDouble value)?, TResult? vectorBase64(EmbeddingVectorString value)?}) → TResult?
inherited
maybeMap<TResult extends Object?>({TResult vector(EmbeddingVectorListDouble value)?, TResult vectorBase64(EmbeddingVectorString value)?, required TResult orElse()}) → TResult
inherited
maybeWhen<TResult extends Object?>({TResult vector(List<double> value)?, TResult vectorBase64(String value)?, required TResult orElse()}) → TResult
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this EmbeddingVector to a JSON map.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>({required TResult vector(List<double> value), required TResult vectorBase64(String value)}) → TResult
inherited
whenOrNull<TResult extends Object?>({TResult? vector(List<double> value)?, TResult? vectorBase64(String value)?}) → TResult?
inherited

Operators

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