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.

WWW::PaLM v0.1.0

WWW::PaLM provides access to the PaLM (Pathways Language Model).

Authors

  • Anton Antonov

License

Artistic-2.0

Dependencies

HTTP::Tiny:ver<0.2.5+>JSON::Fast:ver<0.17+>WWW::OpenAI:ver<0.2.3+>

Test Dependencies

Provides

  • WWW::PaLM
  • WWW::PaLM::EmbedText
  • WWW::PaLM::GenerateMessage
  • WWW::PaLM::GenerateText
  • WWW::PaLM::Models
  • WWW::PaLM::Request

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.