adityadees / laravel-google-bard
A Laravel Package for Google Bard AI Chatbot
Installs: 10 886
Dependents: 0
Suggesters: 0
Security: 0
Stars: 16
Watchers: 3
Forks: 2
Open Issues: 3
Requires
- php: ^7|^8
- illuminate/config: ^7|^8|^9|^10
- illuminate/support: ^7|^8|^9|^10
This package is auto-updated.
Last update: 2024-09-11 20:43:22 UTC
README
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 underconfig
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