ashinnotfound / ChatGPT-YourChatRobot

❤开箱即用❤an unofficial implement of ChatGPT in QQ/Wechat. 一个非官方的ChatGPT腾讯qq/微信(非公众号)实现版,快来把你的qq或微信变成chatgpt吧
MIT License
432 stars 96 forks source link

2023.04.17 读取openai响应消息报错 #55

Closed c100515 closed 1 year ago

c100515 commented 1 year ago

java.lang.RuntimeException: java.io.IOException: unexpected end of stream on https://api.openai.com/... at io.reactivex.internal.util.ExceptionHelper.wrapOrThrow(ExceptionHelper.java:46) at io.reactivex.internal.observers.BlockingMultiObserver.blockingGet(BlockingMultiObserver.java:93) at io.reactivex.Single.blockingGet(Single.java:2870) at com.theokanning.openai.service.OpenAiService.execute(OpenAiService.java:218) at com.theokanning.openai.service.OpenAiService.createChatCompletion(OpenAiService.java:93) at com.ashin.service.impl.InteractServiceImpl.chat(InteractServiceImpl.java:37) at com.ashin.handler.WechatMessageHandler.textMsgHandle(WechatMessageHandler.java:62) at cn.zhouyafeng.itchat4j.core.MsgCenter.handleMsg(MsgCenter.java:130) at cn.zhouyafeng.itchat4j.Wechat$1.run(Wechat.java:28) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: unexpected end of stream on https://api.openai.com/... at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:202) at okhttp3.internal.connection.RealConnection.createTunnel(RealConnection.kt:457) 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 com.theokanning.openai.service.AuthenticationInterceptor.intercept(AuthenticationInterceptor.java:26) 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 retrofit2.OkHttpCall.execute(OkHttpCall.java:204) at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:46) at io.reactivex.Observable.subscribe(Observable.java:12284) at retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:35) at io.reactivex.Observable.subscribe(Observable.java:12284) at io.reactivex.internal.operators.observable.ObservableSingleSingle.subscribeActual(ObservableSingleSingle.java:35) at io.reactivex.Single.subscribe(Single.java:3666) at io.reactivex.Single.blockingGet(Single.java:2869) ... 7 more Caused by: java.io.EOFException: \n not found: limit=0 content=… at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:332) at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:29) at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:178) ... 34 more

ashinnotfound commented 1 year ago

抱歉才看到,具体是什么情况下出现的呢