File Coverage

blib/lib/AI/Ollama/GenerateChatCompletionResponse.pm
Criterion Covered Total %
statement 20 24 83.3
branch n/a
condition n/a
subroutine 7 8 87.5
pod 0 1 0.0
total 27 33 81.8


line stmt bran cond sub pod time code
1             package AI::Ollama::GenerateChatCompletionResponse 0.05;
2             # DO NOT EDIT! This is an autogenerated file.
3              
4 1     1   21 use 5.020;
  1         4  
5 1     1   6 use Moo 2;
  1         15  
  1         7  
6 1     1   485 use experimental 'signatures';
  1         3  
  1         7  
7 1     1   221 use stable 'postderef';
  1         4  
  1         8  
8 1     1   116 use Types::Standard qw(Enum Str Bool Num Int HashRef ArrayRef);
  1         2  
  1         8  
9 1     1   2936 use MooX::TypeTiny;
  1         2  
  1         8  
10              
11 1     1   1061 use namespace::clean;
  1         4  
  1         8  
12              
13             =encoding utf8
14              
15             =head1 NAME
16              
17             AI::Ollama::GenerateChatCompletionResponse -
18              
19             =head1 SYNOPSIS
20              
21             my $obj = AI::Ollama::GenerateChatCompletionResponse->new();
22             ...
23              
24             =cut
25              
26 0     0 0   sub as_hash( $self ) {
  0            
  0            
27 0           return { $self->%* }
28             }
29              
30             =head1 PROPERTIES
31              
32             =head2 C<< created_at >>
33              
34             Date on which a model was created.
35              
36             =cut
37              
38             has 'created_at' => (
39             is => 'ro',
40             isa => Str,
41             );
42              
43             =head2 C<< done >>
44              
45             Whether the response has completed.
46              
47             =cut
48              
49             has 'done' => (
50             is => 'ro',
51             );
52              
53             =head2 C<< eval_count >>
54              
55             Number of tokens the response.
56              
57             =cut
58              
59             has 'eval_count' => (
60             is => 'ro',
61             isa => Int,
62             );
63              
64             =head2 C<< eval_duration >>
65              
66             Time in nanoseconds spent generating the response.
67              
68             =cut
69              
70             has 'eval_duration' => (
71             is => 'ro',
72             isa => Int,
73             );
74              
75             =head2 C<< load_duration >>
76              
77             Time spent in nanoseconds loading the model.
78              
79             =cut
80              
81             has 'load_duration' => (
82             is => 'ro',
83             isa => Int,
84             );
85              
86             =head2 C<< message >>
87              
88             A message in the chat endpoint
89              
90             =cut
91              
92             has 'message' => (
93             is => 'ro',
94             isa => HashRef,
95             );
96              
97             =head2 C<< model >>
98              
99             The model name.
100              
101             Model names follow a `model:tag` format. Some examples are `orca-mini:3b-q4_1` and `llama2:70b`. The tag is optional and, if not provided, will default to `latest`. The tag is used to identify a specific version.
102              
103             =cut
104              
105             has 'model' => (
106             is => 'ro',
107             isa => Str,
108             );
109              
110             =head2 C<< prompt_eval_count >>
111              
112             Number of tokens in the prompt.
113              
114             =cut
115              
116             has 'prompt_eval_count' => (
117             is => 'ro',
118             isa => Int,
119             );
120              
121             =head2 C<< prompt_eval_duration >>
122              
123             Time spent in nanoseconds evaluating the prompt.
124              
125             =cut
126              
127             has 'prompt_eval_duration' => (
128             is => 'ro',
129             isa => Int,
130             );
131              
132             =head2 C<< total_duration >>
133              
134             Time spent generating the response.
135              
136             =cut
137              
138             has 'total_duration' => (
139             is => 'ro',
140             isa => Int,
141             );
142              
143              
144             1;