File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1
1
# laravel-bard
2
2
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
You can’t perform that action at this time.
0 commit comments