Skip to content

Commit 4a3c357

Browse files
authored
Update README.md
1 parent 96d4811 commit 4a3c357

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,38 @@
11
# laravel-bard
22
A Laravel Package for Google Bard AI Chatbot
3+
4+
5+
## INSTALATION
6+
- composer require adityadees/laravel-bard
7+
- php artisan vendor:publish --tag=laravel-lighthouse
8+
- New file `laravel-bard.php` will created under `config` folder
9+
- Fill the `bard_token` with your token
10+
11+
12+
## BARD TOKEN
13+
Visit https://bard.google.com/
14+
Go to Developer tools or press F12
15+
Application → Cookies → Copy the value of __Secure-1PSID cookie.
16+
17+
<img width="864" alt="image" src="https://github.com/adityadees/laravel-bard/assets/37553901/2cea58d3-0c74-464d-9f75-88ab68f213e6">
18+
19+
20+
## RUN
21+
```php
22+
$bard = (new LaravelBard())->get_answer('type_your_text_here');
23+
24+
# to get the reply just access this array
25+
$bard["content"];
26+
27+
# you can access others array like this
28+
$bard["conversation_id"];
29+
$bard["response_id"];
30+
$bard["factualityQueries"];
31+
$bard["textQuery"];
32+
$bard["choices"];
33+
```
34+
35+
36+
Feel free to help improve this package
37+
38+
Note: The package contain resources from repository https://github.com/dsdanielpark/Bard-API

0 commit comments

Comments
 (0)