embeddings | R Documentation |
embeddings Class
embeddings Class
openaistream::openai
-> embeddings
create()
Creates an embedding vector representing the input text.
embeddings$create(model, input, ..., verbosity = 0)
model
character Required. ID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them.
input
character Required. Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for text-embedding-ada-002), cannot be an empty string, and any array must be 2048 dimensions or less.
...
Additional parameters as required by the OpenAI API.For example:encoding_format;user....
verbosity
numeric. Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.).
Embeddings for the input data.
clone()
The objects of this class are cloneable with this method.
embeddings$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.