embeddings_object_request {oaii}R Documentation

API embeddings: get embedding object

Description

Represents an embedding vector returned by embedding endpoint. To get more details, visit https://platform.openai.com/docs/api-reference/embeddings/object https://platform.openai.com/docs/guides/embeddings

Usage

embeddings_object_request(index, embedding, object, api_key = api_get_key())

Arguments

index

integer, The index of the embedding in the list of embeddings

embedding

double vector, the embedding vector, which is a "list of floats". The length of vector depends on the model as listed in the embedding guide.

object

string, the object type, which is always "embedding"

api_key

string, OpenAI API key (see https://platform.openai.com/account/api-keys)

Value

content of the httr response object or SimpleError (conditions) enhanced with two additional fields: 'status_code' (response$status_code) and 'message_long' (built on response content)


[Package oaii version 0.5.0 Index]