Group
Extension

Matches 2

OpenAI-API ( N/NF/NFERRAZ/OpenAI-API-0.37.tar.gz, NFERRAZ, 2023; MetaCPAN )
OpenAI-API/lib/OpenAI/API/Request.pm ( view source; MetaCPAN )
package OpenAI::API::Request;

use IO::Async::Loop;
use IO::Async::Future;
use JSON::MaybeXS;
use LWP::UserAgent;

use Moo;
use strictures 2;
use namespace::clean;

use OpenAI::API::Config;
use OpenAI
se_module" or die $@;

    # Return the OpenAI::API::Response object
    my $decoded_res = decode_json( $res->decoded_content );
    return $response_module->new($decoded_res);
}

sub request_params {
($req);
}

sub _post {
    my ($self) = @_;

    my $req = $self->_create_request( 'POST', encode_json( $self->request_params() ) );
    return $self->_send_request($req);
}

sub send_async {
    my (
OpenAI-API ( N/NF/NFERRAZ/OpenAI-API-0.37.tar.gz, NFERRAZ, 2023; MetaCPAN )
OpenAI-API/lib/OpenAI/API/Request/Image/Generation.pm ( view source; MetaCPAN )
, '512x512', '1024x1024' ], );
has response_format => ( is => 'ro', isa => Enum [ 'url',     'b64_json' ], );
has user            => ( is => 'ro', isa => Str, );

sub endpoint { 'images/generations' }
[optional]

The format in which the generated images are returned. Must be one of
C<url> or C<b64_json>. Defaults to C<url>.

=item * user [optional]

A unique identifier representing your end-user.


Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.