FokersBoolean / AliceBot

74 stars 14 forks source link

WSL2运行jar后键入信息会报错 #4

Open moonEEVEEXwX opened 1 year ago

moonEEVEEXwX commented 1 year ago

错误信息为 com.alibaba.fastjson2.JSONException: illegal input, offset 1, char a at com.alibaba.fastjson2.JSONReader.read(JSONReader.java:1432) at com.alibaba.fastjson2.JSON.parseObject(JSON.java:193) at cn.penidea.alice.chatgpt.Chatbot.getChatStream(Chatbot.java:101) at cn.penidea.alice.chatgpt.Chatbot.getChatResponse(Chatbot.java:216) at cn.penidea.alice.service.impl.ChatGPTServiceImpl.askQuestion(ChatGPTServiceImpl.java:52) at cn.penidea.alice.ws.Client.filterFunction(Client.java:184) at cn.penidea.alice.ws.Client.onMessage(Client.java:94) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tomcat.websocket.pojo.PojoMessageHandlerWholeBase.onMessage(PojoMessageHandlerWholeBase.java:104) at org.apache.tomcat.websocket.WsFrameBase.sendMessageText(WsFrameBase.java:415) at org.apache.tomcat.websocket.WsFrameBase.processDataText(WsFrameBase.java:515) at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:301) at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:133) at org.apache.tomcat.websocket.WsFrameClient.processSocketRead(WsFrameClient.java:95) at org.apache.tomcat.websocket.WsFrameClient.resumeProcessing(WsFrameClient.java:212) at org.apache.tomcat.websocket.WsFrameClient.access$500(WsFrameClient.java:31) at org.apache.tomcat.websocket.WsFrameClient$WsFrameClientCompletionHandler.doResumeProcessing(WsFrameClient.java:189) at org.apache.tomcat.websocket.WsFrameClient$WsFrameClientCompletionHandler.completed(WsFrameClient.java:163) at org.apache.tomcat.websocket.WsFrameClient$WsFrameClientCompletionHandler.completed(WsFrameClient.java:148) at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126) at sun.nio.ch.UnixAsynchronousSocketChannelImpl.finishRead(UnixAsynchronousSocketChannelImpl.java:432) at sun.nio.ch.UnixAsynchronousSocketChannelImpl.finish(UnixAsynchronousSocketChannelImpl.java:191) at sun.nio.ch.UnixAsynchronousSocketChannelImpl.onEvent(UnixAsynchronousSocketChannelImpl.java:213) at sun.nio.ch.EPollPort$EventHandlerTask.run(EPollPort.java:293) at sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)

Touch-Night commented 1 year ago

https://github.com/PlexPt/chatgpt-java/issues/11

参见这个issue,使用小明同学又逃课啦(FokersBoolean)提供的账号和sessiontoken即可

FokersBoolean commented 1 year ago

这个是token错误了,我的账号被拿去登录过,token变了,建议使用自己的token

moonEEVEEXwX commented 1 year ago

这个是token错误了,我的账号被拿去登录过,token变了,建议使用自己的token 依然不行 我使用的是自己的token 并没有多大变化 依然会进行以下报错 com.alibaba.fastjson2.JSONException: illegal input, offset 1, char a at com.alibaba.fastjson2.JSONReader.read(JSONReader.java:1432) at com.alibaba.fastjson2.JSON.parseObject(JSON.java:193) at cn.penidea.alice.chatgpt.Chatbot.getChatStream(Chatbot.java:105) at cn.penidea.alice.chatgpt.Chatbot.getChatResponseByThread(Chatbot.java:249) at cn.penidea.alice.thread.ChatSessionThread.run(ChatSessionThread.java:34) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750)

Eco1i commented 1 year ago

尝试换一下fastjson版本,我采用2.0.10试试看

moonEEVEEXwX commented 1 year ago

已解决 但是呢又出现新问题了 #8 与这个相似