NAME
OpenAI::API::Request::Embedding - embeddings endpoint
SYNOPSIS
use OpenAI::API::Request::Embedding;
my $request = OpenAI::API::Request::Embedding->new(
model => "text-embedding-ada-002",
input => "The food was delicious and the waiter...",
);
my $res = $request->send();
DESCRIPTION
Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.
METHODS
new()
model
input
user [optional]
send()
Sends the request and returns a data structured similar to the one documented in the API reference.
send_async()
Send a request asynchronously. Returns a Promises promise that will be resolved with the decoded JSON response. See OpenAI::API::Request for an example.
SEE ALSO
OpenAI API Reference: Embeddings