laravel google bard
v1.1.1
Google Bard AI チャットボット用の Laravel パッケージ
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 → __Secure-1PSID Cookie の値をコピーします。
$ 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 のリソースが含まれています