/Meet-Bard

a library for PMMP connect to Google Bard AI.

Primary LanguagePHPGNU General Public License v3.0GPL-3.0

Meet-Bard


Lint Discord

NOTICE: This plugin branch is for PocketMine-MP 4.
a library for PMMP connect to Google Bard AI.

composer require taylor/meet-bard

API Docs

Authentication

  1. Visit https://bard.google.com/
  2. F12 for console
  3. Session: Application → Cookies → Copy the value of __Secure-1PSID cookie.

Usage

Simple usage looks like:

use TaylorR\MeetBard\Bard;
use TaylorR\MeetBard\security\User;

$token = '';
$user = new User($token);
$bardai = new Bard($user);
$ask = $this->client->ask("Hello, how are you?");
var_dump($ask);

Include in your plugin

If you use Poggit to build your plugin, you can add it to your .poggit.yml like so:

projects:
  MyPlugin:
    path: ""
    libs:
      - src: TaylorR47/Meet-Bard/Meet-Bard
        version: ^1.0.0

License

GPL-3.0 License. Please see LICENSE for more information.