OpenAIEmbeddingClientProperties

class OpenAIEmbeddingClientProperties(val url: String = "https://api.openai.com/v1/embeddings", val model: String = "text-embedding-3-large", val batchSize: Int = 300, val apiKey: String = System.getenv("OPENAI_API_KEY"))

An implementation of the EmbeddingClient that uses OpenAI embeddings.

Constructors

Link copied to clipboard
constructor(url: String = "https://api.openai.com/v1/embeddings", model: String = "text-embedding-3-large", batchSize: Int = 300, apiKey: String = System.getenv("OPENAI_API_KEY"))

Properties

Link copied to clipboard

The API key for OpenAI. It defaults to the OPENAI_API_KEY environment variable.

Link copied to clipboard
val batchSize: Int = 300

The batch size for embedding. It defaults to 300.

Link copied to clipboard

The model to use for embedding. It defaults to "text-embedding-3-large".

Link copied to clipboard
val url: String