piscesCat / Bard-AI-Reverse-PHP

PHP Reverse Google Bard AI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bard-AI-Reverse

Bard-AI-Reverse is a Composer package that allows you to interact with Google Bard AI using PHP code.

Language

Installation

Minimum PHP version required is 7.2.5

Use Composer to install the package.

Run the following command in the terminal:

composer require khaiphan/bard-reverse:dev-main

Usage

  1. First, you need to include the autoloader in your PHP code:
require 'vendor/autoload.php';
  1. Next, create an instance of the Bard class and provide cookie Google Bard AI:
use KhaiPhan\Google\Bard;

$bard = new Bard('__Secure-1PSID');

Make sure you replace '__Secure-1PSID' with the value of the __Secure-1PSID cookie obtained from the Google Bard AI website.

  1. Then, call the getAnswer() method to retrieve the response from Bard AI:
$answer = $bard->getAnswer('Hello');
  1. You can access the answer from Bard AI through the $answer['content'] variable. For example:
$content = $bard['content'];
echo $content;

License

This package is open-source and available under the MIT License.

About

PHP Reverse Google Bard AI

License:MIT License


Languages

Language:PHP 100.0%