EmbeddingsResponse

data class EmbeddingsResponse(val embeddings: List<List<Float>>, val model: String, val createdAt: Instant, val totalDuration: Long? = null, val loadDuration: Long? = null, val promptEvalCount: Int? = null, val promptEvalDuration: Long? = null)(source)

Represents a response from the embeddings endpoint.

Constructors

Link copied to clipboard
constructor(embeddings: List<List<Float>>, model: String, createdAt: Instant, totalDuration: Long? = null, loadDuration: Long? = null, promptEvalCount: Int? = null, promptEvalDuration: Long? = null)

Properties

Link copied to clipboard
@SerialName(value = "created_at")
val createdAt: Instant

Timestamp when the response was created

Link copied to clipboard

The generated embedding vectors

Link copied to clipboard
@SerialName(value = "load_duration")
val loadDuration: Long?

Time spent loading the model (in nanoseconds)

Link copied to clipboard

The model name used for generation

Link copied to clipboard
@SerialName(value = "prompt_eval_count")
val promptEvalCount: Int?

Number of tokens in the prompt

Link copied to clipboard
@SerialName(value = "prompt_eval_duration")
val promptEvalDuration: Long?

Time spent evaluating the prompt (in nanoseconds)

Link copied to clipboard
@SerialName(value = "total_duration")
val totalDuration: Long?

Time spent generating the embeddings (in nanoseconds)