laravel google bard
v1.1.1
Google Bard AI Chatbot용 Laravel 패키지
composer require adityadees/laravel-google-bard
php artisan vendor:publish --tag=laravel-bard
config
폴더 아래에 새 파일 laravel-bard.php
생성됩니다.bard_token
토큰으로 채웁니다. https://bard.google.com/을 방문하세요. 개발자 도구로 이동하거나 F12 애플리케이션 → 쿠키 → __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 저장소의 리소스가 포함되어 있습니다.