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

ChatGPT Java SDK。支持 GPT3.5、 GPT4 API。开箱即用。

Results 85 chatgpt-java issues
Sort by recently updated
recently updated
newest added

![问题](https://user-images.githubusercontent.com/59311273/207380500-daf793a8-0151-4bff-ad77-aa211a821262.png) 请问下调用“Map chatResponse = chatbot.getChatResponse("你好");” 为什么会报错“java.lang.ExceptionInInitializerError”

通过手动输入参数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)

有没有办法设置一个代理呢,因为国内并不能登录openai,但是使用代理获得的token加上国内的cf_clearance和user-agent并不能成功访问。所以希望能添加个代理设置。

session_token: null Error refreshing session

"Request Url:https://chat.openai.com/api/auth/session Error,http status: 403,response body: \n\n\n Just a moment...\n \n \n \n \n \n \n\n\n\n \n \n \n \n chat.openai.com\n \n \n Checking if the site connection is secure\n...