Learn R Programming

openaiRtools (version 0.2.2)

EmbeddingsClient: Embeddings Client

Description

Provides text embedding (vectorization) via the OpenAI Embeddings API. Access via client$embeddings.

Arguments

Methods


Method new()

Usage

EmbeddingsClient$new(parent)


Method create()

Usage

EmbeddingsClient$create(
  input,
  model = "text-embedding-ada-002",
  encoding_format = NULL,
  dimensions = NULL,
  user = NULL
)


Method clone()

The objects of this class are cloneable with this method.

Usage

EmbeddingsClient$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Details

Embeddings are numerical vector representations of text that capture semantic meaning. Similar texts produce similar vectors. Common uses include semantic search, clustering, classification, and recommendation systems.