ashinnotfound / ChatGPT-YourChatRobot

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

Exception in EventHandler #40

Closed yqs6666 closed 1 year ago

yqs6666 commented 1 year ago

2023-03-19 22:33:06 W/Bot 3118583823: An exception occurred when processing event. Subscriber scope: ''. Broadcaster scope: 'Bot.3118583823.EventDispatcher' net.mamoe.mirai.event.ExceptionInEventHandlerException: Exception in EventHandler at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt.registerEventHandler$callMethod$invokeWithErrorReport(JvmMethodListenersInternal.kt:147) at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt.access$registerEventHandler$callMethod$invokeWithErrorReport(JvmMethodListenersInternal.kt:1) at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt$registerEventHandler$callMethod$2.invokeSuspend(JvmMethodListenersInternal.kt:154) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) Caused by: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119) at java.base/java.lang.reflect.Method.invoke(Method.java:577) at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt.registerEventHandler$callMethod$invokeWithErrorReport(JvmMethodListenersInternal.kt:140) ... 10 more Caused by: java.lang.RuntimeException: java.net.ConnectException: Failed to connect to /127.0.0.1:7890 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.QqMessageHandler.response(QqMessageHandler.java:66) at com.ashin.handler.QqMessageHandler.onMessage(QqMessageHandler.java:48) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ... 12 more Caused by: java.net.ConnectException: Failed to connect to /127.0.0.1:7890 at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:297) at okhttp3.internal.connection.RealConnection.connectTunnel(RealConnection.kt:261) 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) ... 18 more Caused by: java.net.ConnectException: Connection refused: no further information at java.base/sun.nio.ch.Net.pollConnect(Native Method) at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672) at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:539) at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:594) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) at java.base/java.net.Socket.connect(Socket.java:633) at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:128) at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:295) ... 44 more

求助

ashinnotfound commented 1 year ago

em 是不是代理没配置正确

yqs6666 commented 1 year ago

请问具体怎么配置呢,不太懂这个

ashinnotfound commented 1 year ago

ip一般是127.0.0.1,port的话你看看你用的代理软件,一般都会给出,然后把他俩填在application.yml里

yqs6666 commented 1 year ago

感谢感谢