File Coverage

blib/lib/AI/Ollama/GenerateEmbeddingRequest.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::GenerateEmbeddingRequest 0.05;
2             # DO NOT EDIT! This is an autogenerated file.
3              
4 1     1   13 use 5.020;
  1         3  
5 1     1   4 use Moo 2;
  1         9  
  1         4  
6 1     1   291 use experimental 'signatures';
  1         2  
  1         5  
7 1     1   95 use stable 'postderef';
  1         2  
  1         4  
8 1     1   65 use Types::Standard qw(Enum Str Bool Num Int HashRef ArrayRef);
  1         1  
  1         6  
9 1     1   1607 use MooX::TypeTiny;
  1         2  
  1         5  
10              
11 1     1   683 use namespace::clean;
  1         1  
  1         5  
12              
13             =encoding utf8
14              
15             =head1 NAME
16              
17             AI::Ollama::GenerateEmbeddingRequest -
18              
19             =head1 SYNOPSIS
20              
21             my $obj = AI::Ollama::GenerateEmbeddingRequest->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<< model >>
33              
34             The model name.
35              
36             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.
37              
38             =cut
39              
40             has 'model' => (
41             is => 'ro',
42             isa => Str,
43             required => 1,
44             );
45              
46             =head2 C<< options >>
47              
48             Additional model parameters listed in the documentation for the Modelfile such as `temperature`.
49              
50             =cut
51              
52             has 'options' => (
53             is => 'ro',
54             isa => HashRef,
55             );
56              
57             =head2 C<< prompt >>
58              
59             Text to generate embeddings for.
60              
61             =cut
62              
63             has 'prompt' => (
64             is => 'ro',
65             isa => Str,
66             required => 1,
67             );
68              
69              
70             1;