EmbeddingsRequest

data class EmbeddingsRequest(val model: String, val input: List<String>, val truncate: Boolean? = true, val options: ModelOptions? = null, val keepAlive: String? = null)(source)

Represents a request to generate embeddings for a single string or list of string inputs with a provided model.

Constructors

Link copied to clipboard
constructor(model: String, input: List<String>, truncate: Boolean? = true, options: ModelOptions? = null, keepAlive: String? = null)

Properties

Link copied to clipboard
@Serializable(with = StringOrListSerializer::class)
val input: List<String>

List of text to generate embeddings for

Link copied to clipboard
@SerialName(value = "keep_alive")
val keepAlive: String?

Controls how long the model will stay loaded into memory following the request (default: "5m")

Link copied to clipboard

The model name to use for generation (required)

Link copied to clipboard

Additional model parameters

Link copied to clipboard

Truncates the end of each input to fit within context length. Returns error if false and context length is exceeded. Defaults to true