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.

SEE ALSO

OpenAI API Reference: Embeddings