adityadees/laravel-google-bard

A Laravel Package for Google Bard AI Chatbot
11,215 16
Install
composer require adityadees/laravel-google-bard
Latest Version:v1.1.1
PHP:^7|^8
Laravel:7 – 10
License:MIT
Last Updated:Jun 11, 2023
Links: GitHub  ·  Packagist
Maintainer: adityadees

laravel-bard

A Laravel Package for Google Bard AI Chatbot

INSTALATION

  • composer require adityadees/laravel-google-bard
  • php artisan vendor:publish --tag=laravel-bard
  • New file laravel-bard.php will created under config folder
  • Fill the bard_token with your token

BARD TOKEN

Visit https://bard.google.com/ Go to Developer tools or press F12 Application → Cookies → Copy the value of __Secure-1PSID cookie.

RUN

$bard = (new LaravelBard())->get_answer('type_your_text_here');

# to get the reply just access this array
$bard["content"];

# you can access others array like this
$bard["conversation_id"];
$bard["response_id"];
$bard["factualityQueries"];
$bard["textQuery"];
$bard["choices"];

Example

$bard = (new LaravelBard())->get_answer('hello whats your name');
dd($bard["content"]);

Feel free to help improve this package

Note: The package contain resources from repository https://github.com/dsdanielpark/Bard-API

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

644,549,754 9,698
laravel/framework

The Laravel Framework.

598,760,099 34,966
laravel/tinker

Powerful REPL for the Laravel framework.

507,193,856 7,441
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

423,477,751 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

403,217,078 4,664

Version History

Version Released PHP Laravel License
v1.1.1 ^7|^8 ^7|^8|^9|^10 MIT
v1.1.0 ^7|^8 ^7|^8|^9|^10 MIT
v1.0.0 ^7|^8 ^7|^8|^9|^10 MIT
Pre-releases (6)
Version Released PHP Laravel License
v0.2.1-alpha ^7|^8 ^7|^8|^9|^10 MIT
v0.2.0-alpha ^7|^8 ^7|^8|^9|^10 MIT
v0.1.3-alpha ^7|^8 ^7|^8|^9|^10 MIT
v0.1.2-alpha ^7|^8 ^7|^8|^9|^10 MIT
v0.1.1-alpha ^7|^8 ^7|^8|^9|^10 MIT