laravel google bard
v1.1.1
Пакет Laravel для чат-бота Google Bard AI
composer require adityadees/laravel-google-bard
php artisan vendor:publish --tag=laravel-bard
laravel-bard.php
будет создан в папке config
.bard_token
своим токеном. Посетите https://bard.google.com/. Перейдите в Инструменты разработчика или нажмите F12 Приложение → Файлы cookie → Скопируйте значение файла 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 " ]);
Не стесняйтесь помочь улучшить этот пакет
Примечание. Пакет содержит ресурсы из репозитория https://github.com/dsdanielpark/Bard-API.