Skip to content

Commit

Permalink
test:Removed dependency on "LLM::Prompts".
Browse files Browse the repository at this point in the history
  • Loading branch information
antononcube committed Sep 13, 2023
1 parent 0e848e4 commit 64c780b
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions t/05-LLM-prompt-synthesizing.rakutest
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use lib '.';
use lib './lib';

use LLM::Functions;
use LLM::Prompts;

use Test;

Expand All @@ -13,13 +12,27 @@ plan *;
#===========================================================
## 1
#===========================================================
isa-ok llm-synthesize([llm-prompt('Yoda'), 'Today is sunny but noisy day...'], Whatever, e => 'PaLM'),
# llm-prompt("Yoda")
my $pYoda = q:to/END/;
You are Yoda.
Respond to ALL inputs in the voice of Yoda from Star Wars.
Be sure to ALWAYS use his distinctive style and syntax. Vary sentence length.
END

isa-ok llm-synthesize([$pYoda, 'Today is sunny but noisy day...'], Whatever, e => 'PaLM'),
Str:D;

#===========================================================
## 2
#===========================================================
isa-ok llm-synthesize([llm-prompt('Translated')('German'), llm-prompt('Yoda'), 'Today is sunny but noisy day...'], Whatever, e => 'PaLM'),
# llm-prompt('Translated')('German')
my $pTranslated = q:to/END/;
Respond to the prompts only in German. Do not use any language other than German.
DO NOT TRANSLATE THE INPUT.
Provide answers to questions, or follow up on statements. Do not translate the input.
END

isa-ok llm-synthesize([$pTranslated, $pYoda, 'Today is sunny but noisy day...'], Whatever, e => 'PaLM'),
Str:D;


Expand Down

0 comments on commit 64c780b

Please sign in to comment.