laravel google bard
v1.1.1
Un package Laravel pour le chatbot Google Bard AI
composer require adityadees/laravel-google-bard
php artisan vendor:publish --tag=laravel-bard
laravel-bard.php
sera créé dans le dossier config
bard_token
avec votre jeton Visitez https://bard.google.com/ Accédez aux outils de développement ou appuyez sur F12 Application → Cookies → Copiez la valeur du 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 " ]);
N'hésitez pas à contribuer à l'amélioration de ce package
Remarque : Le package contient des ressources du référentiel https://github.com/dsdanielpark/Bard-API