AI-Image
view release on metacpan or search on metacpan
lib/AI/Image.pm view on Meta::CPAN
The language model to use (default: 'dall-e-2').
See L<https://platform.openai.com/docs/models/overview>
=item size
The size for the generated image (default: '512x512').
=item debug
Used for testing. If set to any true value, the image method
will return details of the error encountered instead of C<undef>
=back
=head2 image
my $url = $ai->image($prompt);
Generates an image based on the provided prompt and returns the URL of the generated image. The URL is valid for 1 hour.
t/version.t view on Meta::CPAN
use strict;
use Test::More;
use AI::Image;
unless ( $ENV{RELEASE_TESTING} ) {
plan( skip_all => "Author tests not required for installation" );
}
my $code_version = $AI::Image::VERSION;
ok($code_version, 'version set');
ok(open(my $source, '<', $INC{'AI/Image.pm'}), 'open the source');
my $in_version;
while (<$source>) {
if (/^=head1 VERSION/) {
$in_version = 1;
} elsif (/^=head1/) {
undef $in_version;
}
( run in 0.569 second using v1.01-cache-2.11-cpan-49f99fa48dc )