Giter Site home page Giter Site logo

google-bard's Introduction

About LarryDpk

Hi guys, I'm Larry Deng, a Java Developer based on Guangzhou. Welcome to my GitHub LarryDpk.

I'm writing tech articles on my webSite www.pkslow.com, hope you can find something useful for you.

What I have done and be doing:

GitHub Status

LarryDpk's github stats

Star History

Star History Chart

Languages

My Skills

  • Java
  • Python
  • Git/Maven/Jenkins
  • Oracle/PostgreSQL/MySQL
  • Spring/Spring Boot/Spring Cloud
  • Docker
  • Kubernetes
  • GCP(Google Cloud Platform)
  • Azure
  • DevOps
  • Terraform
  • Flutter

Certificates

  • 2021-12-18 Terraform Associate
  • 2020-11 Certificated Kubernetes Administrator
  • 2011-12 CET-6 (College English Test)

关于南瓜

你终于来了!

欢迎来到南瓜慢说的世界。大家好,我是南瓜,我是一名在广州的Java开发。我会持续在我的个人网站南瓜慢说上输出一些技术文章,希望能帮助到大家。

南瓜慢说的个人网站为 www.pkslow.com ,寓意就是南瓜慢说(pumpkin slow). 该网站会记录我最新和最全的文章,部分文章会同步其它平台。

对应的GitHub仓库为:pkslow-samples,该仓库主要是个人技术文章和相关的代码示例。 主要涉及的内容有:

  • Java
  • Spring Boot
  • Spring Cloud
  • Docker
  • Kubernetes
  • Cloud
  • Big Data
  • Python

将坚持记录所思所想,希望带给自己成长的同时,能帮助到别人。

做一个简简单单的人,

做一个普普通通的人,

做一个不伤害社会的人,

做一个至少有一点点益处的人。

过好自己渺小的一生,而不至于虚无、后悔。

每一个不曾起舞的日子,都是对生命的辜负。


我的主要输出

联系方式

我的技术栈

  • Java
  • Python
  • Maven
  • Oracle/PostgreSQL/MySQL
  • Docker
  • Kubernetes
  • GCP(Google Cloud Platform)
  • Azure
  • DevOps
  • Terraform
  • Flutter

证书

  • 2021-12 Terraform Associate
  • 2020-11 Certificated Kubernetes Administrator
  • 2013-06 学校优秀毕业生
  • 2012-12 优秀学生
  • 2012-09 北京市大学生机器人大赛创意设计赛竞赛项目三等奖
  • 2012-06 北京市电子设计竞赛三等奖
  • 2011-12 大学英语六级
  • 2011-09 全国大学生数学建模大赛北京市一等奖
  • 2008-04 清远市三好学生
  • 2003-05 全国小学数学奥林匹克数学竞赛三等奖

google-bard's People

Contributors

larrydpk avatar netp-dany avatar tolunaym avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

google-bard's Issues

Unexpected response code for CONNECT: 501

20:01:50.436 [main] INFO com.pkslow.ai.WebUtils -- Creating OkHttpClient with timeout PT10M
20:01:51.466 [main] INFO com.pkslow.ai.WebUtils -- OkHttpClient created
java.lang.RuntimeException: java.io.IOException: Unexpected response code for CONNECT: 501
at com.pkslow.ai.GoogleBardClient.getSNlM0e(GoogleBardClient.java:186)
at com.pkslow.ai.GoogleBardClient.ask(GoogleBardClient.java:50)
at org.example.GoogleBardExample.main(GoogleBardExample.java:15)
Caused by: java.io.IOException: Unexpected response code for CONNECT: 501
at okhttp3.internal.connection.RealConnection.createTunnel(RealConnection.kt:483)
at okhttp3.internal.connection.RealConnection.connectTunnel(RealConnection.kt:262)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:201)
at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
at com.pkslow.ai.GoogleBardClient.getSNlM0e(GoogleBardClient.java:179)
... 2 more
Suppressed: java.io.IOException: Unexpected response code for CONNECT: 501
... 20 more
java.lang.RuntimeException: java.io.IOException: Unexpected response code for CONNECT: 501
at com.pkslow.ai.GoogleBardClient.getSNlM0e(GoogleBardClient.java:186)
at com.pkslow.ai.GoogleBardClient.ask(GoogleBardClient.java:50)
at org.example.GoogleBardExample.main(GoogleBardExample.java:18)
Caused by: java.io.IOException: Unexpected response code for CONNECT: 501
at okhttp3.internal.connection.RealConnection.createTunnel(RealConnection.kt:483)
at okhttp3.internal.connection.RealConnection.connectTunnel(RealConnection.kt:262)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:201)
at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
at com.pkslow.ai.GoogleBardClient.getSNlM0e(GoogleBardClient.java:179)
... 2 more
Suppressed: java.io.IOException: Unexpected response code for CONNECT: 501
... 20 more
java.lang.RuntimeException: java.io.IOException: Unexpected response code for CONNECT: 501
at com.pkslow.ai.GoogleBardClient.getSNlM0e(GoogleBardClient.java:186)
at com.pkslow.ai.GoogleBardClient.ask(GoogleBardClient.java:50)
at org.example.GoogleBardExample.main(GoogleBardExample.java:21)
Caused by: java.io.IOException: Unexpected response code for CONNECT: 501
at okhttp3.internal.connection.RealConnection.createTunnel(RealConnection.kt:483)
at okhttp3.internal.connection.RealConnection.connectTunnel(RealConnection.kt:262)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:201)
at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
at com.pkslow.ai.GoogleBardClient.getSNlM0e(GoogleBardClient.java:179)
... 2 more
Suppressed: java.io.IOException: Unexpected response code for CONNECT: 501
... 20 more

support for conversation

It'd be really great if we could somehow use the conversation id of a chat for asking stuff with context of previous chats, there seems to be no API for that right now

Impossible to find cookie __Secure-1PSIDTS

Hello,
I've tried to copy the cookies like the documentation said, but I can not find the second cookie... I've tried on Firefox and Edge, but no result for them. Any suggestions ?

image
image

Getting NO_ANSWER Response

Hi,

I started getting NO_ANSWER from yesterday. I tried to update the token but still the same response.

From the debug logs, it seems the answer is getting retrieved but the answer.getStatus() is returning NO_ANSWER.

15:04:33.638 [main] INFO com.pkslow.ai.util.WebUtils - Creating OkHttpClient with timeout PT5M
15:04:33.907 [main] INFO com.pkslow.ai.util.WebUtils - OkHttpClient created
15:04:35.087 [main] INFO com.pkslow.ai.GoogleBardClient - getSNlM0e Response code: 200
15:04:35.375 [main] INFO com.pkslow.ai.GoogleBardClient - calling Bard with request BardRequest{strSNlM0e=AJWyuYUjDH_9NAY6TKznEr2tVPRV:1687867475189, question=What is the date today?, conversationId=, responseId=, choiceId=}
15:04:37.866 [main] INFO com.pkslow.ai.GoogleBardClient - Ask Response code: 200
15:04:38.500 [main] DEBUG com.pkslow.ai.GoogleBardClient - Result for ask: [["wrb.fr",null,"[null,["c_2db4888103d20c51","r_2db4888103d20772"],[["what is the date today",1],["Is it 365 day today?",4],["How do I write today's date?",4]],null,[["rc_2db4888103d20f17",["Today is Tuesday, June 27, 2023."],[],null,null,null,true,null,null,"en",null,null,[null,null,null,null,null,[[]]]],["rc_2db4888103d20a38",["As of today, June 27, 2023, it is Tuesday. The current time is 05:04:37 PST."],[],null,null,null,true,null,null,"en",null,null,[null,null,null,null,null,[[]]]],["rc_2db4888103d20559",["Today is Tuesday, June 27, 2023. It is 05:04:37 PST in Pacific Standard Time (PST)."],[],null,null,null,true,null,null,"en",null,null,[null,null,null,null,null,[[]]]]],["Jeddah Saudi Arabia","SWML_DESCRIPTION_FROM_YOUR_PLACES_HOME",false,[[[null,null,null,[[300,200],14]]],[[2,null,null,null,null,[[[[215642548,391786194],60,null,null,null,null,true]],null,[1]]]],null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[null,null,null,null,null,null,null,true]],"//www.google.com/maps/vt/data\u003dx_l8kLOq5C-m9VrL5DJKPb7sDFIjWntSsXhIFvoUvEcgOdC4uI744UaaRqOi-PeoNHNY4evEvL9yR3Yv6fwXM-3byP2xAPBq_plMmNlSwxEHEJmH0FT3xJvSCbIYPrQXpS4GAqfwIpQ"],null,null,"SA"]"]]
15:04:38.500 [main] DEBUG com.pkslow.ai.GoogleBardClient - Raw answers length: 1242

Answer.getStatus() = ERROR

The issue with the response is still persisting.

An ERROR when trying to retrieve the answer. (answer.getStatus() => ERROR)

Using latest 0.3.5 with key combinations ($__Secure-1PSID;$__Secure-1PSIDTS) as the token.

Kindly check.

Abnormal operation

16:14:04.253 [main] INFO com.pkslow.ai.WebUtils -- Creating OkHttpClient with timeout PT5M
16:14:05.010 [main] INFO com.pkslow.ai.WebUtils -- OkHttpClient created
16:14:06.371 [main] INFO com.pkslow.ai.GoogleBardClient -- getSNlM0e Response code: 200
java.lang.NullPointerException: Parameter specified as non-null is null: method okhttp3.FormBody$Builder.add, parameter value
at okhttp3.FormBody$Builder.add(FormBody.kt)
at com.pkslow.ai.GoogleBardClient.requestBodyForAsk(GoogleBardClient.java:141)
at com.pkslow.ai.GoogleBardClient.postRequestForAsk(GoogleBardClient.java:120)
at com.pkslow.ai.GoogleBardClient.ask(GoogleBardClient.java:95)
at com.pkslow.ai.GoogleBardClient.ask(GoogleBardClient.java:41)
at com.pkslow.ai.GoogleBardExample.main(GoogleBardExample.java:15)

Getting ConnectException: Failed to connect to localhost:7890

Hi, I am trying to run this code (using v 0.3.5) and I am getting the exception shown below. I am running this from the US. Is this region supported?

` String token = t1 + ";" + t2;

	NetworkUtils.setUpProxy("127.0.0.1", "7890");
	AIClient client = new GoogleBardClient(token, Duration.ofMinutes(10));
	Answer answer = client.ask("Tell me a joke");
	
	if (answer.getStatus() == AnswerStatus.OK) {
		System.out.println(answer.markdown());
	}
	else {
		System.out.println(answer.toString());
	}`

I get the following exception...
01:22:29.450 [main] INFO com.pkslow.ai.util.WebUtils -- Creating OkHttpClient with timeout PT10M 01:22:29.722 [main] INFO com.pkslow.ai.util.WebUtils -- OkHttpClient created 01:22:29.764 [main] ERROR com.pkslow.ai.GoogleBardClient -- Failed to get answer: java.lang.RuntimeException: java.net.ConnectException: Failed to connect to /127.0.0.1:7890 at com.pkslow.ai.GoogleBardClient.callBardToGetSNlM0e(GoogleBardClient.java:73) at com.pkslow.ai.GoogleBardClient.ask(GoogleBardClient.java:42) at AI.Bard.main(Bard.java:21) Caused by: java.net.ConnectException: Failed to connect to /127.0.0.1:7890 at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:297) at okhttp3.internal.connection.RealConnection.connectTunnel(RealConnection.kt:261) at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:201) at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226) at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106) at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74) at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255) at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201) at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154) at com.pkslow.ai.GoogleBardClient.callBardToGetSNlM0e(GoogleBardClient.java:68) ... 2 common frames omitted Caused by: java.net.ConnectException: Connection refused (Connection refused) at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:128) at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:295) ... 19 common frames omitted Answer(status=ERROR, chosenAnswer=null, images=null)

why i get this result :No Answer: Answer(status=NO_ANSWER, chosenAnswer=null, images=null)

11:01:06.817 [main] INFO com.pkslow.ai.GoogleBardClient -- getSNlM0e Response code: 200
11:01:07.555 [main] INFO com.pkslow.ai.GoogleBardClient -- calling Bard with request BardRequest{strSNlM0e=AOTFbH4txcjTYWlPABGtcQ_hFJcH:1693537266664, question=can you show me a picture of clock?, conversationId=, responseId=, choiceId=}
11:01:08.416 [main] INFO com.pkslow.ai.GoogleBardClient -- Ask Response code: 200
11:01:08.642 [main] DEBUG com.pkslow.ai.GoogleBardClient -- Result for ask: [["wrb.fr",null,null,null,null,[9]]]
11:01:08.642 [main] DEBUG com.pkslow.ai.GoogleBardClient -- Raw answers length: 36
11:01:08.681 [main] INFO com.pkslow.ai.GoogleBardExample -- No Answer: Answer(status=NO_ANSWER, chosenAnswer=null, images=null)

Postman Test

I'm working on it using your library. By the way, I want to test with Postman, so I tested url, header values, and body values based on logs, but there is a 404 error, is there a way to test with Postman?

Getting frequent errors with java.lang.RuntimeException: Can't access to Google Bard

Getting frequent erros with below
08:49:39.727 [http-nio-8080-exec-1] ERROR com.pkslow.ai.GoogleBardClient - Failed to get answer: java.lang.NullPointerException: Parameter specified as non-null is null: method okhttp3.FormBody$Builder.add, parameter value

Previously it worked by changing the token from cookie, but now it does not seem to work even after updating the new token from __Secure-1PSID
Could you help to verify if something changed on Bard api side.

429 on any request

Any request gives me 429 http error with redirect link to google's page "Are you human? We suspect, you're robot" + capcha

Did logout in browser on Bard page, picked new cookies - the same.

Remove Logger

Really Appreciate your effort. But Would you mind remove your Logger factory? It causes conflict with my logback dependency

No SLF4J providers were found.

I can build the library successfully, but when running my code AIClient client = new GoogleBardClient( "my_bard_key" ); i get this exception:

SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
java.lang.NoClassDefFoundError: okhttp3/OkHttpClient$Builder
	at com.pkslow.ai.util.WebUtils.okHttpClientWithTimeout(WebUtils.java:14)
	at com.pkslow.ai.GoogleBardClient.<init>(GoogleBardClient.java:33)
	at com.pkslow.ai.GoogleBardClient.<init>(GoogleBardClient.java:28)

How can i fix this please?

Avoid Lombok as transitive dependency

Hi, I was reviewing the repository and I noticed that Lombok is defined as transitive dependency but it is not necessary. It could generate the code and not need to be considered as required dependency.

<dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
            <scope>compile</scope>
        </dependency>

Do you accept a PR to avoid it?

Juan Antonio

Request prompt cannot deal with escape characters. Such as “” quotation marks.

Hi,

If my input prompt is: What do you think of "Apple Vision Pro"?, then it returrned 400.
But if I remove quoation marks like: What do you think of Apple Vision Pro?, then it works fine.
image

image

And actually I want to send json text in my prompt which will contains ", \n, \t, etc. So my guess is all these escape needed characters were not handled. I also looked up okHttp doc to find a solution and tried to made some code change but not succeed. So here to ask for help. Thank you.

Answer in XML or JSON format returns java.lang.IllegalStateException

I am trying to have get an answer in xml or json format. I am getting an exception whenever I trigger the ask method.

I tried the following:
Question: write the sequence from one to ten in xml format.

15:12:28.657 [main] INFO com.pkslow.ai.GoogleBardClient - Ask Response code: 400
15:12:28.672 [main] ERROR com.pkslow.ai.GoogleBardClient - Failed to get answer:
java.lang.IllegalStateException: Can't get the answer
at com.pkslow.ai.GoogleBardClient.callBardToAsk(GoogleBardClient.java:98)
at com.pkslow.ai.GoogleBardClient.ask(GoogleBardClient.java:53)
at com.ak.articlebot.FeedConsumer.main(FeedConsumer.java:53)

Error testing the example provided in the documentation

Hi,

I am testing your library with the example from the project:

Code:

public class BardDemo {

    public static void main(String[] args) {
        AIClient client = new GoogleBardClient("MY_TOKEN");
        Answer answer = client.ask("What is the date today?");
    }
}

but I don´t understand the following error:

17:31:59.717 [BardDemo.main()] INFO com.pkslow.ai.util.WebUtils -- Creating OkHttpClient with timeout PT5M
17:32:00.011 [BardDemo.main()] INFO com.pkslow.ai.util.WebUtils -- OkHttpClient created
17:32:00.731 [BardDemo.main()] INFO com.pkslow.ai.GoogleBardClient -- getSNlM0e Response code: 200
17:32:00.809 [BardDemo.main()] INFO com.pkslow.ai.GoogleBardClient -- calling Bard with request BardRequest{strSNlM0e=null, question=What is the date today?, conversationId=, responseId=, choiceId=}
17:32:00.814 [BardDemo.main()] ERROR com.pkslow.ai.GoogleBardClient -- Failed to get answer: 
java.lang.NullPointerException: Parameter specified as non-null is null: method okhttp3.FormBody$Builder.add, parameter value
        at okhttp3.FormBody$Builder.add(FormBody.kt)
        at com.pkslow.ai.util.BardUtils.buildRequestBodyForAsk(BardUtils.java:100)
        at com.pkslow.ai.util.BardUtils.createPostRequestForAsk(BardUtils.java:86)
        at com.pkslow.ai.GoogleBardClient.callBardToAsk(GoogleBardClient.java:89)
        at com.pkslow.ai.GoogleBardClient.ask(GoogleBardClient.java:53)
        at BardDemo.main(BardDemo.java:15)
        at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:254)
        at java.base/java.lang.Thread.run(Thread.java:833)

I am using this version of your project:

https://mvnrepository.com/artifact/com.pkslow/google-bard

        <dependency>
            <groupId>com.pkslow</groupId>
            <artifactId>google-bard</artifactId>
            <version>0.3.3</version>
        </dependency>

Can you help me?

Many thanks in advance

Juan Antonio

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.