Experience Google Bard

environment

  • windows 10 64bit

  • Google Bard

  • python 3.8

Introduction

This article introduces the reverse engineering of an open source Googlechat robot. Using it, you can use the service for free. Project address: https://github.com/acheong08/BardBardAPIBard

Installation and use

pipInstall via

pip <span class="hljs-keyword" style="color: rgb(248, 35, 117); word-wrap: inherit !important; word-break: inherit !important;" style="font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">install <span class="hljs-comment" style="color: rgb(128, 128, 128); word-wrap: inherit !important; word-break: inherit !important;" style="font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">--upgrade GoogleBard
</span class="hljs-comment" style="color: rgb(128, 128, 128); word-wrap: inherit !important; word-break: inherit !important;"></span class="hljs-keyword" style="color: rgb(248, 35, 117); word-wrap: inherit !important; word-break: inherit !important;">

Next, we need to get the session key, open the URL https://bard.google.com/ in the browser, press on the keyboard, enter the F12console, come to Application--> Cookies, find url, filter the string Secure-1PSID, copy the value

8b3a94c770da7fc0b2622e16b9e2ff44.png

google bard

Then, go to the terminal and start the service

<span class="hljs-attribute" style="color: rgb(238, 220, 112); word-wrap: inherit !important; word-break: inherit !important;" style="font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">python -m Bard --session <span class="hljs-string" style="color: rgb(238, 220, 112); word-wrap: inherit !important; word-break: inherit !important;" style="font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">"VgiTpJBqhJqxfinFutFiBhZq4CAJcEBFSnApxX_iSmQgxq7CJOr_zA68P4CsWjbZswnP9g."
</span class="hljs-string" style="color: rgb(238, 220, 112); word-wrap: inherit !important; word-break: inherit !important;"></span class="hljs-attribute" style="color: rgb(238, 220, 112); word-wrap: inherit !important; word-break: inherit !important;">

--sessionThe value of the parameter is the secret key copied above

65fd02306686fb42958252c44107b481.png

google bard

You:After the prompt, you can fill in the question you want to ask, then press Alt + Enteror Esc + Enterto send , and then wait Bardfor the answer. What is more embarrassing is that BardChinese is not supported yet, but the response speed is still acceptable.

colab notebook

If you are used to it colab notebook, you can visit this link

https://drive.google.com/file/d/1YyMWxTJgH4M0RbNRTpeDB8I97AZjKuc1/view?usp=sharing

FAQ

If the following error is reported when starting the service

60ba3c636e70c62352dc770ee46ac7c6.png

google bard

Generally, it is because the above session key is incorrect. In some cases, the last one .is also part of the key. For details, please refer to link 2 at the end of the article.

References

  • https://github.com/acheong08/Bard

  • https://github.com/acheong08/Bard/issues/11

08cf75eea22d7dd321c9b0055b90e232.jpeg

Guess you like

Origin blog.csdn.net/djstavaV/article/details/130377299