AI-Embedding
view release on metacpan or search on metacpan
t/02-test.t view on Meta::CPAN
my $test_string1 = 'The cat sat on the mat';
my $test_string2 = 'Hickory dickory dock';
my $embed1 = $embed_pass->test_embedding($test_string1);
is( scalar split (/,/, $embed1), 1536, "Correct first embed length");
my $embed2 = $embed_pass->test_embedding($test_string2);
is( scalar split (/,/, $embed2), 1536, "Correct second embed length");
my $embed3 = $embed_pass->test_embedding($test_string2);
ok( $embed2 eq $embed3, "Same text - same test embedding" );
ok( $embed2 ne $embed1, "Different text - different test embedding" );
done_testing(6);
( run in 1.304 second using v1.01-cache-2.11-cpan-39bf76dae61 )