chatgpt-java icon indicating copy to clipboard operation
chatgpt-java copied to clipboard

StringIndexOutOfBoundsException

Open Smi1eSEC opened this issue 2 years ago • 6 comments

通过手动输入参数session_token、cf_clearance and user_agent. 昨天晚上可以使用,今天早上报错 [C] java.lang.StringIndexOutOfBoundsException: String index out of range: -1 [C] at java.lang.String.substring(String.java:1931) [C] at com.github.plexpt.chatgpt.Chatbot.getChatText(Chatbot.java:177) [C] at com.github.plexpt.chatgpt.Chatbot.getChatResponse(Chatbot.java:236) [C] at com.github.plexpt.chatgpt.Chatbot.getChatResponse(Chatbot.java:245)

Smi1eSEC avatar Dec 13 '22 02:12 Smi1eSEC

参数过期了,貌似是俩小时就过期了

daozei6 avatar Dec 13 '22 03:12 daozei6

我重新输入过了还是不行

Smi1eSEC avatar Dec 13 '22 03:12 Smi1eSEC

获取参数的ip要与运行程序ip一致

daozei6 avatar Dec 13 '22 03:12 daozei6

我使用vpn的全局代理, 是ip和浏览器是一致的也不行

Ailichiyann avatar Dec 13 '22 03:12 Ailichiyann

我看那个回复接口返回的里面有两个input 内容是加密的串 是不是人家连夜做了加密还是什么原因?

zhuqinyue avatar Dec 13 '22 04:12 zhuqinyue

Yesterday, OpenAI added additional Cloudflare protections that make it more difficult to access the unofficial API.

(昨天,OpenAI 添加了额外的 Cloudflare 保护措施,使访问非官方 API 变得更加困难。)

zhuqinyue avatar Dec 13 '22 08:12 zhuqinyue