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::PaLMFrom GitHub:
zef install https://github.com/antononcube/Raku-WWW-PaLMUsage 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 --helpRemark: 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
TODO Implement moderations.
DONE Comparison with "WWW::OpenAI", [AAp1].
The comparison is done via workflows with "LLM::Functions", [AAp3]
DONE Hook-up finding textual answers implemented in "WWW::OpenAI", [AAp1].
There is a dedicated package for this now -- see "ML::FindTextualAnswer", [AAp4].
References
Articles
[AA1] Anton Antonov, "Workflows with LLM functions", (2023), RakuForPredictions at WordPress.
[AA2] Anton Antonov, "Number guessing games: PaLM vs ChatGPT" (2023), RakuForPredictions at WordPress.
[ZG1] Zoubin Ghahramani, "Introducing PaLM 2", (2023), Google Official Blog on AI.
Packages, platforms
[AAp1] Anton Antonov, WWW::OpenAI Raku package, (2023), GitHub/antononcube.
[AAp2] Anton Antonov, Lingua::Translation::DeepL Raku package, (2022), GitHub/antononcube.
[AAp3] Anton Antonov, LLM::Functions Raku package, (2023), GitHub/antononcube.
[AAp4] Anton Antonov, ML::FindTextualAnswer Raku package, (2023), GitHub/antononcube.
[OAI1] OpenAI Platform, OpenAI platform.