EmbeddingInput

@Serializable(with = EmbeddingInputSerializer::class)
sealed interface EmbeddingInput

Text or pre-tokenized input for an embedding request.

Inheritors

Types

Link copied to clipboard
@Serializable
value class Text(val value: String) : EmbeddingInput

A single text input.

Link copied to clipboard
@Serializable
value class Texts(val value: List<String>) : EmbeddingInput

A batch of text inputs.

Link copied to clipboard
@Serializable
value class TokenBatch(val value: List<List<Int>>) : EmbeddingInput

A batch of pre-tokenized inputs.

Link copied to clipboard
@Serializable
value class Tokens(val value: List<Int>) : EmbeddingInput

A single pre-tokenized input.