EmbeddingVector

org.llm4s.llmconnect.model.EmbeddingVector
See theEmbeddingVector companion object
@Stable
final case class EmbeddingVector

Represents a dense embedding vector produced by an embedding model.

Value parameters

dim

dimensionality of the embedding vector

id

unique identifier for this embedding (e.g. document or chunk ID)

meta

optional key-value metadata associated with this embedding Build one with EmbeddingVector.apply and change it with the with* setters; the constructor and copy are private, so a new field never breaks callers.

modality

the input modality that was embedded (e.g. text, image)

model

name of the embedding model that produced this vector

values

raw float values of the embedding vector

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def withDim(dim: Int): EmbeddingVector

Sets the dimensionality.

Sets the dimensionality.

Attributes

def withId(id: String): EmbeddingVector

Sets the identifier.

Sets the identifier.

Attributes

def withMeta(meta: Map[String, String]): EmbeddingVector

Sets the metadata.

Sets the metadata.

Attributes

Sets the embedded modality.

Sets the embedded modality.

Attributes

def withModel(model: String): EmbeddingVector

Sets the embedding model name.

Sets the embedding model name.

Attributes

def withValues(values: Array[Float]): EmbeddingVector

Sets the vector values.

Sets the vector values.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product