LarryDpk / Google-Bard

A Java Lib for Google-Bard API (Reverse engineering of Google's Bard API)
MIT License
88 stars 26 forks source link

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

Closed SherlockZh closed 1 year ago

SherlockZh commented 1 year ago

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.

SherlockZh commented 1 year ago

Resolved. By changing prompt to What do you think of \\\"Apple Vision Pro\\\"?.

LarryDpk commented 1 year ago

I also fixed in version 0.3.1 for "

falniak95 commented 1 year ago

When I send a question with "' it's returning the same exception, for your information!