This commit is contained in:
parent
122c4fd5c4
commit
1304eb119f
1 changed files with 15 additions and 1 deletions
|
@ -10,7 +10,21 @@ A result from a an embedding request, L<OpenAIAsync::Types::Request::Completion>
|
||||||
|
|
||||||
=head1 SYNOPSIS
|
=head1 SYNOPSIS
|
||||||
|
|
||||||
... todo
|
use IO::Async::Loop;
|
||||||
|
use OpenAIAsync::Client;
|
||||||
|
|
||||||
|
my $loop = IO::Async::Loop->new();
|
||||||
|
my $client = OpenAIAsync::Client->new();
|
||||||
|
|
||||||
|
$loop->add($client);
|
||||||
|
|
||||||
|
my $output = $client->embedding({
|
||||||
|
input => "My hovercraft is full of eels",
|
||||||
|
model => "text-embedding-ada-002",
|
||||||
|
encoding_format => "float"
|
||||||
|
})->get();
|
||||||
|
|
||||||
|
print Dumper($output->data->embedding);
|
||||||
|
|
||||||
=head1 Fields
|
=head1 Fields
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue