OpenAIEmbeddingClient

An embedding client which uses the OpenAI API to embed text.

Parameters

openAIEmbeddingClientProperties

The properties for the client.

Constructors

Link copied to clipboard
constructor(openAIEmbeddingClientProperties: OpenAIEmbeddingClientProperties)

Functions

Link copied to clipboard
open override fun batchEmbed(texts: List<String>): Result<List<List<Double>>, EmbeddingClientException>

Embeds the given texts.

Link copied to clipboard
open override fun embed(text: String): Result<List<Double>, EmbeddingClientException>

Embeds the given text.