Skip to content

Commit

Permalink
tests:Added Gemini's AI-vision tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
antononcube committed Mar 17, 2024
1 parent 68fe8ca commit e9838ce
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions xt/08-llm-vision-functions.rakutest
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use lib './lib';
use LLM::Functions;
use LLM::Functions::Configuration;
use LLM::Functions::Evaluator;
use Image::Markup::Utilities;

use Test;

Expand All @@ -14,10 +15,9 @@ plan *;
#===========================================================
## 1
#===========================================================

my $url1 = 'https://raw.githubusercontent.com/antononcube/MathematicaForPrediction/master/MarkdownDocuments/Diagrams/AI-vision-via-WL/0iyello2xfyfo.png';
isa-ok llm-vision-synthesize('Describe the image.', $url1), Str;

isa-ok llm-vision-synthesize('Describe the image.', $url1), Str;

#===========================================================
## 2
Expand All @@ -26,4 +26,22 @@ isa-ok llm-vision-synthesize('Describe the image.', $url1), Str;
#say llm-vision-function({"For the given image answer the question: $_ . Be as concise as possible in your answers."}, $url1)('How many years are present?');
isa-ok llm-vision-function({"For the given image answer the question: $_ . Be as concise as possible in your answers."}, $url1), Callable;

#===========================================================
## 3
#===========================================================

# Gemini does not work with URLs, only images.

nok llm-vision-synthesize('Describe the image.', $url1, e => 'Gemini');

#===========================================================
## 4
#===========================================================

# Gemini does not work with URLs, only images.
my $img4 = image-import($url1);

isa-ok llm-vision-synthesize('Describe the image.', $img4, e => 'Gemini'), Str;


done-testing;

0 comments on commit e9838ce

Please sign in to comment.