README-work
WWW::PaLM Raku package
Raku package for connecting with PaLM (Pathways Language Model).
The design and implementation of the package closes follows that of "WWW::OpenAI", [AAp1];
Installation
From Zef ecosystem:
zef install WWW::PaLM
From GitHub:
zef install https://github.com/antononcube/Raku-WWW-PaLM
Usage examples
Show models:
use WWW::PaLM;
palm-models()
Show text generation:
.say for palm-generate-text('what is the population in Brazil?', format => 'values', n => 3);
Show message generation:
.say for palm-generate-message('Who wrote the book "Dune"?');
Show text embeddings:
my @vecs = palm-embed-text(["say something nice!",
"shout something bad!",
"wher is the best coffee made?"],
format => 'values');
.say for @vecs;
Command Line Interface
Maker suite access
The package provides a Command Line Interface (CLI) script:
palm-prompt --help
Remark: When the authorization key argument "auth-key" is specified set to "Whatever"
then palm-prompt
attempts to use the env variable PALM_API_KEY
.
Mermaid diagram
The following flowchart corresponds to the steps in the package function palm-prompt
:
TODO
Implement moderations.
Comparison with "WWW::OpenAI", [AAp1].
Hook-up finding textual answers implemented in "WWW::OpenAI", [AAp1].
References
Packages, platforms
[AAp1] Anton Antonov, WWW::OpenAI Raku package, (2023), GitHub/antononcube.
[AAp2] Anton Antonov, Lingua::Translation::DeepL Raku package, (2022), GitHub/antononcube.
[OAI1] OpenAI Platform, OpenAI platform.
[ZG1] Zoubin Ghahramani, "Introducing PaLM 2", (2023), Google Official Blog on AI.