Skip to content

piscesCat/Bard-AI-Reverse-PHP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages