laravel google bard
v1.1.1
Un paquete Laravel para Google Bard AI Chatbot
composer require adityadees/laravel-google-bard
php artisan vendor:publish --tag=laravel-bard
laravel-bard.php
en la carpeta de config
bard_token
con tu token Visite https://bard.google.com/ Vaya a Herramientas para desarrolladores o presione F12 Aplicación → Cookies → Copie el valor de la cookie __Secure-1PSID.
$ 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 " ];
$ bard = ( new LaravelBard ())-> get_answer ( ' hello whats your name ' );
dd ( $ bard [ " content " ]);
No dudes en ayudar a mejorar este paquete.
Nota: el paquete contiene recursos del repositorio https://github.com/dsdanielpark/Bard-API