line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package OpenAI::API::Request::Model::Retrieve; |
2
|
|
|
|
|
|
|
|
3
|
16
|
|
|
16
|
|
116
|
use strict; |
|
16
|
|
|
|
|
49
|
|
|
16
|
|
|
|
|
542
|
|
4
|
16
|
|
|
16
|
|
89
|
use warnings; |
|
16
|
|
|
|
|
92
|
|
|
16
|
|
|
|
|
472
|
|
5
|
|
|
|
|
|
|
|
6
|
16
|
|
|
16
|
|
99
|
use Types::Standard qw(Str); |
|
16
|
|
|
|
|
81
|
|
|
16
|
|
|
|
|
147
|
|
7
|
|
|
|
|
|
|
|
8
|
16
|
|
|
16
|
|
25699
|
use Moo; |
|
16
|
|
|
|
|
42
|
|
|
16
|
|
|
|
|
116
|
|
9
|
16
|
|
|
16
|
|
6243
|
use strictures 2; |
|
16
|
|
|
|
|
118
|
|
|
16
|
|
|
|
|
624
|
|
10
|
16
|
|
|
16
|
|
3006
|
use namespace::clean; |
|
16
|
|
|
|
|
64
|
|
|
16
|
|
|
|
|
140
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
extends 'OpenAI::API::Request'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
has model => ( is => 'ro', isa => Str, required => 1 ); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub endpoint { |
17
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
18
|
0
|
|
|
|
|
|
return 'models/' . $self->{model}; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
0
|
1
|
|
sub method { 'GET' } |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__END__ |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 NAME |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
OpenAI::API::Request::Model::Retrieve - retrieve model details |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 SYNOPSIS |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
use OpenAI::API::Request::Model::Retrieve; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my $request = OpenAI::API::Request::Model::Retrieve->new( |
36
|
|
|
|
|
|
|
model => 'text-davinci-003', |
37
|
|
|
|
|
|
|
); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
my $res = $request->send(); |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
my $id = $res->{id}; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 DESCRIPTION |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Retrieves a model instance, providing basic information about the model |
46
|
|
|
|
|
|
|
such as the owner and permissioning. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 METHODS |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head2 new() |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=over |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=item model |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=back |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head2 send() |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Sends the request and returns a data structured similar to the one |
61
|
|
|
|
|
|
|
documented in the API reference. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 SEE ALSO |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
OpenAI API Reference: L<Models|https://platform.openai.com/docs/api-reference/models> |