laravel google bard
v1.1.1
Um pacote Laravel para Google Bard AI Chatbot
composer require adityadees/laravel-google-bard
php artisan vendor:publish --tag=laravel-bard
laravel-bard.php
será criado na pasta config
bard_token
com seu token Visite https://bard.google.com/ Vá para Ferramentas do desenvolvedor ou pressione F12 Aplicativo → Cookies → Copie o valor do 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 " ]);
Sinta-se à vontade para ajudar a melhorar este pacote
Nota: O pacote contém recursos do repositório https://github.com/dsdanielpark/Bard-API