Google Bard
google-bard 0.3.6
Google Bard
是 Google 的實驗性對話式人工智慧聊天服務。它的功能與 ChatGPT 類似,最大的區別是 Google 的服務將從網路中提取資訊。
我想以更簡單的方式自動使用Google Bard
,因此我為其建立了一個 Java 庫。該庫支援與同一客戶的連續對話。
對於maven項目:
< dependencies >
< dependency >
< groupId >com.pkslow</ groupId >
< artifactId >google-bard</ artifactId >
< version >0.3.6</ version >
</ dependency >
</ dependencies >
__Secure-1PSID
和__Secure-1PSIDTS
撥打電話很簡單:
AIClient client = new GoogleBardClient ( token );
Answer answer = client . ask ( "can you show me a picture of clock?" );
我們需要從瀏覽器取得令牌進行身份驗證。它的 cookie 名為__Secure-1PSID
和__Secure-1PSIDTS
,我們需要複製該值。將兩個令牌組合為$__Secure-1PSID;$__Secure-1PSIDTS
例子:
ZAiXYL4nedulA03ly0Ea2IdDTk2Emg4YJfuqs3YCcdxxxxxxxxx3XyDzlRqexw.;sidts-CjIBSAxbGXMW7bfOuuE0LOf-DDy20302Dh-npVoG**********86bhkxFwCw4QuaDyz1BAA
如果遇到 SNlM0e is null 問題,您可能需要清除 cookie 並重新登入:
__Secure-1PSID
和__Secure-1PSIDTS
使用範例程式碼
Google Bard
目前正在開發中,因此可能不適用於您所在的國家/地區,因此您可以在執行應用程式之前設定代理程式:
NetworkUtils . setUpProxy ( "localhost" , "7890" );
Markdown
格式。 Sure thing. I found you a few photos of different types of clocks:
* ** Analog Clock: ** This is the most common type of clock, and it has a face with hands that point to the hour, minute, and second.
[ ![ Image of Analog clock ] ( https://cdn.shopify.com/s/files/1/0556/8066/3742/products/4550344275733_org_1200x1200.jpg?v=1678206891 )] ( https://www.muji.us/products/analog-clock-l-laca0a )
* ** Digital Clock: ** This type of clock displays the time in numbers, and it can be either battery-powered or plugged into an outlet.
[ ![ Image of Digital clock ] ( https://m.media-amazon.com/images/I/61MuSYQ7yhL._AC_UF894,1000_QL80_.jpg )] ( https://www.amazon.in/YORTOT-Oversize-Control-Brightness-Temperature/dp/B08R8FW63J )
* ** Alarm Clock: ** This type of clock is designed to wake you up at a certain time, and it can have a variety of features, such as snooze, a light, and a radio.
[ ![ Image of Alarm clock ] ( https://m.media-amazon.com/images/I/71ggBUmny9L.jpg )] ( https://www.amazon.com/Sharp-Twin-Bell-Alarm-Clock/dp/B08TB22P29 )
* ** Sundial: ** This type of clock uses the sun to tell time, and it is a popular choice for people who want to live a more sustainable lifestyle.
[ ![ Image of Sundial ] ( https://www.thehoarde.com/resources/images/blog-pictures/Sundial-1-(Deposit-Photos)-21-7-22-crop-v2.jpg )] ( https://www.thehoarde.com/blog/a-beginners-guide-to-the-garden-sundial )
* ** Cuckoo Clock: ** This type of clock is a traditional European clock that has a cuckoo bird that pops out to announce the time.
[ ![ Image of Cuckoo clock ] ( https://m.media-amazon.com/images/I/81OBtQVTkuL._AC_UF894,1000_QL80_.jpg )] ( https://www.amazon.com/Trenkle-Quartz-Cuckoo-Forest-Chopper/dp/B00VZQ5ZTY )
I hope this helps!