EmbeddingRequest

@Serializable
class EmbeddingRequest(val model: ModelId, val input: List<String>, val dimensions: Int? = null, val user: String? = null)

Create an embedding request.

documentation

Constructors

Link copied to clipboard
constructor(model: ModelId, input: List<String>, dimensions: Int? = null, user: String? = null)

Properties

Link copied to clipboard
val dimensions: Int? = null

The number of dimensions the resulting output embeddings should have.

Link copied to clipboard

Input text to get embeddings for, encoded as an array of token. Each input must not exceed 2048 tokens in length.

Link copied to clipboard

ID of the model to use.

Link copied to clipboard
val user: String? = null

A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse.