Embeddings

data class Embeddings(val embeddings: List<Float>, val index: Int = 0, val objectType: String = "embedding")(source)

Represents a response from the OpenAI embeddings API.

See also

Constructors

Link copied to clipboard
constructor(embeddings: List<Float>, index: Int = 0, objectType: String = "embedding")

Properties

Link copied to clipboard
@SerialName(value = "embedding")
val embeddings: List<Float>

The list of embedding vectors, where each vector represents the embeddings for one input.

Link copied to clipboard

The index of the embedding in the list of embeddings.

Link copied to clipboard
@SerialName(value = "object")
val objectType: String

The object type, which is always "embedding" for embedding objects.