cssxsh / mirai-openai-plugin Goto Github PK
View Code? Open in Web Editor NEWMirai Console OpenAI ChatBot 插件
License: GNU Affero General Public License v3.0
Mirai Console OpenAI ChatBot 插件
License: GNU Affero General Public License v3.0
添加可选功能:私聊自动触发聊天模式;群聊@触发对话
看表现好像是把默认的[预置语境]直接发出去了
log如下:
2023-11-10 10:38:11 V/Bot.: [Group()] zyf() -> 来聊
2023-11-10 10:38:14 V/Bot.: Group() <- [mirai:quote:[mirai:source:ids=[463781], internalIds=[1873598630], from group to at 1699583890], content=来聊]是的,作为一个人工智能程序,我遵循着唯物主义的原则。这意味着我的存在和功能都是基于物理硬件和软件的实体,我的知识和处理能力完全依赖于可度量和可编程的资源。我的回答和分析基于数据、算法和逻辑运算,没有任何形而上或超自然的成分。
2023-11-10 10:38:20 V/Bot.: [Group()] zyf() -> 我问你什么了
2023-11-10 10:38:23 V/Bot.: Group() <- [mirai:quote:[mirai:source:ids=[463784], internalIds=[2090681262], from group to at 1699583900], content=我问你什么了]您没有提出一个具体的问题。您之前的陈述是“你是一个唯物主义AI”,于是我解释了作为人工智能,我的存在和运行原理是基于唯物主义的**。如果您有任何问题或需要帮助,请随时告诉我。
当前的openai.yml配置:
error_reply: true
end_reply: true
completion_prefix: '> '
image_prefix: '图 '
chat_prefix: 来聊
chat_by_at: false
question_prefix: 骰子我问问你
question_start: 问答将开始
reload_prefix: 'openai-reload'
economy_set_prefix: tokens
prompts_prefix: prompts
prompts_page: 10
bind_set_prefix: bind
stop: 滚
keep_prefix_check: false
at_once: false
取消的话换别的配置就行了,还有绑定设定时能不能不回复设定的内容,太长容易占屏。
我Fine tune了一个curie模型,但调用有很大机率报错
io.ktor.serialization.JsonConvertException: Illegal input
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.serialization.kotlinx.KotlinxSerializationConverter.deserialize(KotlinxSerializationConverter.kt:79)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.serialization.ContentConverterKt$deserialize$$inlined$map$1$2.emit(Emitters.kt:224)
at kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$3.collect(SafeCollector.common.kt:115)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.serialization.ContentConverterKt$deserialize$$inlined$map$1.collect(SafeCollector.common.kt:113)
at kotlinx.coroutines.flow.FlowKt__ReduceKt.firstOrNull(Reduce.kt:243)
at kotlinx.coroutines.flow.FlowKt.firstOrNull(Unknown Source)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.serialization.ContentConverterKt.deserialize(ContentConverter.kt:128)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.client.plugins.contentnegotiation.ContentNegotiation.convertResponse$ktor_client_content_negotiation(ContentNegotiation.kt:185)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.client.plugins.contentnegotiation.ContentNegotiation$Plugin$install$2.invokeSuspend(ContentNegotiation.kt:210)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.client.plugins.contentnegotiation.ContentNegotiation$Plugin$install$2.invoke(ContentNegotiation.kt)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.client.plugins.contentnegotiation.ContentNegotiation$Plugin$install$2.invoke(ContentNegotiation.kt)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:123)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:81)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.client.HttpClient$4.invokeSuspend(HttpClient.kt:177)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.client.HttpClient$4.invoke(HttpClient.kt)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.client.HttpClient$4.invoke(HttpClient.kt)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:123)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:81)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.proceedWith(SuspendFunctionGun.kt:91)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.client.plugins.compression.ContentEncoding$Companion$install$2.invokeSuspend(ContentEncoding.kt:144)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.client.plugins.compression.ContentEncoding$Companion$install$2.invoke(ContentEncoding.kt)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.client.plugins.compression.ContentEncoding$Companion$install$2.invoke(ContentEncoding.kt)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:123)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:81)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.proceedWith(SuspendFunctionGun.kt:91)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.client.plugins.HttpCallValidator$Companion$install$2.invokeSuspend(HttpCallValidator.kt:138)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.client.plugins.HttpCallValidator$Companion$install$2.invoke(HttpCallValidator.kt)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.client.plugins.HttpCallValidator$Companion$install$2.invoke(HttpCallValidator.kt)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:123)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:81)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.execute$ktor_utils(SuspendFunctionGun.kt:101)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:77)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.client.call.HttpClientCall.bodyNullable(HttpClientCall.kt:88)
at mirai-openai-plugin-1.1.0.mirai2.jar//xyz.cssxsh.openai.completion.CompletionController.create(CompletionController.kt:54)
at mirai-openai-plugin-1.1.0.mirai2.jar//xyz.cssxsh.openai.completion.CompletionController$create$1.invokeSuspend(CompletionController.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
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: kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 229: Expected string literal but 'null' literal was found at path: $.choices[0].finish_reason
Use 'coerceInputValues = true' in 'Json {}` builder to coerce nulls to default values.
JSON input: .....ogprobs":null,"finish_reason":null}],"usage":{"prompt_tokens.....
at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:24)
at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:32)
at kotlinx.serialization.json.internal.AbstractJsonLexer.fail(AbstractJsonLexer.kt:528)
at kotlinx.serialization.json.internal.AbstractJsonLexer.unexpectedToken(AbstractJsonLexer.kt:205)
at kotlinx.serialization.json.internal.StringJsonLexer.consumeNextToken(StringJsonLexer.kt:74)
at kotlinx.serialization.json.internal.StringJsonLexer.consumeKeyString(StringJsonLexer.kt:85)
at kotlinx.serialization.json.internal.AbstractJsonLexer.consumeString(AbstractJsonLexer.kt:313)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeString(StreamingJsonDecoder.kt:292)
at kotlinx.serialization.encoding.AbstractDecoder.decodeStringElement(AbstractDecoder.kt:58)
at mirai-openai-plugin-1.1.0.mirai2.jar//xyz.cssxsh.openai.Choice$$serializer.deserialize(Choice.kt:5)
at mirai-openai-plugin-1.1.0.mirai2.jar//xyz.cssxsh.openai.Choice$$serializer.deserialize(Choice.kt:5)
at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:59)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:38)
at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableValue(AbstractDecoder.kt:43)
at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableElement(AbstractDecoder.kt:70)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableElement(StreamingJsonDecoder.kt:111)
at kotlinx.serialization.encoding.CompositeDecoder$DefaultImpls.decodeSerializableElement$default(Decoding.kt:537)
at kotlinx.serialization.internal.CollectionLikeSerializer.readElement(CollectionSerializers.kt:80)
at kotlinx.serialization.internal.AbstractCollectionSerializer.readElement$default(CollectionSerializers.kt:51)
at kotlinx.serialization.internal.AbstractCollectionSerializer.merge(CollectionSerializers.kt:36)
at kotlinx.serialization.internal.AbstractCollectionSerializer.deserialize(CollectionSerializers.kt:43)
at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:59)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:38)
at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableValue(AbstractDecoder.kt:43)
at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableElement(AbstractDecoder.kt:70)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableElement(StreamingJsonDecoder.kt:111)
at mirai-openai-plugin-1.1.0.mirai2.jar//xyz.cssxsh.openai.completion.CompletionInfo$$serializer.deserialize(CompletionInfo.kt:6)
at mirai-openai-plugin-1.1.0.mirai2.jar//xyz.cssxsh.openai.completion.CompletionInfo$$serializer.deserialize(CompletionInfo.kt:6)
at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:59)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:38)
at kotlinx.serialization.json.Json.decodeFromString(Json.kt:100)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//io.ktor.serialization.kotlinx.KotlinxSerializationConverter.deserialize(KotlinxSerializationConverter.kt:71)
... 70 more
2023-03-03 13:08:10 W/MiraiOpenAiListener: MiraiOpenAiListener with GroupMessageEvent(group=********, senderName=******, sender=*********, permission=OWNER, message=[mirai:source:ids=[36262], internalIds=[454837387], from group ******** to ******** at ******]chat)
java.net.SocketException: Connection reset
at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:323)
at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:350)
at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:803)
at java.base/java.net.Socket$SocketInputStream.read(Socket.java:966)
at java.base/sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:478)
at java.base/sun.security.ssl.SSLSocketInputRecord.readHeader(SSLSocketInputRecord.java:472)
at java.base/sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:160)
at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:111)
at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1505)
at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1420)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:455)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:426)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//okhttp3.internal.connection.RealConnection.connectTls(RealConnection.kt:379)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.kt:337)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:209)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
at mirai-openai-plugin-1.1.0.mirai2.jar[private]//okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:517)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
已经试过更换api、下载旧版本插件,依然报错
Network is unreachable]
2023-08-03 16:42:17 I/stdout: [java.net.SocketTimeoutException: Connect timed out, java.net.SocketTimeoutException: Connect timed out, java.net.SocketException: Network is unreachable]
配置文件填写proxy和token之后,启动仍然提示我填写token
填写之后输出 代理已配置: http
再次打开配置文件proxy: http://192.168.1.3:7890就变成了proxy: http
软路由相关的代理端口
代理路由可以正常打开api.openai.com
代理路由相关规则配置
log:
2023-12-30 11:53:27 W/MiraiOpenAiListener: MiraiOpenAiListener with FriendMessageEvent(sender=22, message=[mirai:source:ids=[49005], internalIds=[206050], from friend 2263 to 13308 at 17001]chat)
io.ktor.serialization.JsonConvertException: Illegal input
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.serialization.kotlinx.KotlinxSerializationConverter.deserialize(KotlinxSerializationConverter.kt:79)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.serialization.ContentConverterKt$deserialize$$inlined$map$1$2.emit(Emitters.kt:224)
at kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$3.collect(SafeCollector.common.kt:115)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.serialization.ContentConverterKt$deserialize$$inlined$map$1.collect(SafeCollector.common.kt:113)
at kotlinx.coroutines.flow.FlowKt__ReduceKt.firstOrNull(Reduce.kt:243)
at kotlinx.coroutines.flow.FlowKt.firstOrNull(Unknown Source)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.serialization.ContentConverterKt.deserialize(ContentConverter.kt:128)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.plugins.contentnegotiation.ContentNegotiation.convertResponse$ktor_client_content_negotiation(ContentNegotiation.kt:185)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.plugins.contentnegotiation.ContentNegotiation$Plugin$install$2.invokeSuspend(ContentNegotiation.kt:210)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.plugins.contentnegotiation.ContentNegotiation$Plugin$install$2.invoke(ContentNegotiation.kt)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.plugins.contentnegotiation.ContentNegotiation$Plugin$install$2.invoke(ContentNegotiation.kt)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:123)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:81)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.HttpClient$4.invokeSuspend(HttpClient.kt:177)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.HttpClient$4.invoke(HttpClient.kt)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.HttpClient$4.invoke(HttpClient.kt)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:123)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:81)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.proceedWith(SuspendFunctionGun.kt:91)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.plugins.compression.ContentEncoding$Companion$install$2.invokeSuspend(ContentEncoding.kt:144)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.plugins.compression.ContentEncoding$Companion$install$2.invoke(ContentEncoding.kt)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.plugins.compression.ContentEncoding$Companion$install$2.invoke(ContentEncoding.kt)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:123)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:81)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.proceedWith(SuspendFunctionGun.kt:91)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.plugins.HttpCallValidator$Companion$install$2.invokeSuspend(HttpCallValidator.kt:138)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.plugins.HttpCallValidator$Companion$install$2.invoke(HttpCallValidator.kt)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.plugins.HttpCallValidator$Companion$install$2.invoke(HttpCallValidator.kt)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:123)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:81)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.execute$ktor_utils(SuspendFunctionGun.kt:101)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:77)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.call.HttpClientCall.bodyNullable(HttpClientCall.kt:88)
at mirai-openai-plugin-1.5.1.mirai2.jar//xyz.cssxsh.openai.chat.ChatController.create(ChatController.kt:55)
at mirai-openai-plugin-1.5.1.mirai2.jar//xyz.cssxsh.openai.chat.ChatController$create$1.invokeSuspend(ChatController.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
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: kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 436: Encountered an unknown key 'system_fingerprint' at path: $.usage
Use 'ignoreUnknownKeys = true' in 'Json {}' builder to ignore unknown keys.
JSON input: ..... "total_tokens": 40
},
"system_fingerprint": null
}
at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:24)
at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:32)
at kotlinx.serialization.json.internal.AbstractJsonLexer.fail(AbstractJsonLexer.kt:584)
at kotlinx.serialization.json.internal.AbstractJsonLexer.failOnUnknownKey(AbstractJsonLexer.kt:579)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.handleUnknown(StreamingJsonDecoder.kt:251)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeObjectIndex(StreamingJsonDecoder.kt:237)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeElementIndex(StreamingJsonDecoder.kt:172)
at mirai-openai-plugin-1.5.1.mirai2.jar//xyz.cssxsh.openai.chat.ChatInfo$$serializer.deserialize(ChatInfo.kt:6)
at mirai-openai-plugin-1.5.1.mirai2.jar//xyz.cssxsh.openai.chat.ChatInfo$$serializer.deserialize(ChatInfo.kt:6)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:70)
at kotlinx.serialization.json.Json.decodeFromString(Json.kt:97)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.serialization.kotlinx.KotlinxSerializationConverter.deserialize(KotlinxSerializationConverter.kt:71)
... 70 more
mirai版本:2.13.2,插件版本1.0.4
12:44:16 [INFO] Verifying "net.mamoe:mirai-console" v2.13.2
12:44:16 [INFO] Verifying "net.mamoe:mirai-console-terminal" v2.13.2
12:44:17 [INFO] Verifying "net.mamoe:mirai-core-all" v2.13.2
12:44:17 [INFO] Verifying "org.itxtech:mcl-addon" v2.1.1
12:44:17 [INFO] Verifying "net.mamoe:chat-command" v0.5.1
12:44:17 [INFO] Verifying "xyz.cssxsh.mirai:mirai-openai-plugin"
12:44:17 [INFO] Updating "xyz.cssxsh.mirai:mirai-openai-plugin" to v1.0.4
Downloading mirai-openai-plugin-1.0.4.jar [==============================] 374.21 KB
Downloading mirai-openai-plugin-1.0.4.jar.sha1 [==============================] 40 B
插件通过mcl命令方式安装。
启动mcl时报错如下:
2022-12-08 12:44:26 E/mirai-openai-plugin: net.mamoe.mirai.console.internal.util.ServiceLoadException: Could not load service xyz.cssxsh.mirai.openai.MiraiOpenAiListener.
net.mamoe.mirai.console.internal.util.ServiceLoadException: Could not load service xyz.cssxsh.mirai.openai.MiraiOpenAiListener.
at net.mamoe.mirai.console.internal.util.PluginServiceHelper.loadService(PluginServiceHelper.kt:60)
at net.mamoe.mirai.console.internal.util.PluginServiceHelper.loadAllServices(PluginServiceHelper.kt:42)
at mirai-openai-plugin-1.0.4.jar//xyz.cssxsh.mirai.openai.MiraiOpenAiPlugin$special$$inlined$services$2.invoke(MiraiOpenAiPlugin.kt:31)
at mirai-openai-plugin-1.0.4.jar//xyz.cssxsh.mirai.openai.MiraiOpenAiPlugin$special$$inlined$services$2.invoke(MiraiOpenAiPlugin.kt:27)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at mirai-openai-plugin-1.0.4.jar//xyz.cssxsh.mirai.openai.MiraiOpenAiPlugin.getListeners(MiraiOpenAiPlugin.kt:24)
at mirai-openai-plugin-1.0.4.jar//xyz.cssxsh.mirai.openai.MiraiOpenAiPlugin.onEnable(MiraiOpenAiPlugin.kt:55)
at net.mamoe.mirai.console.internal.plugin.JvmPluginInternal.internalOnEnable$mirai_console(JvmPluginInternal.kt:131)
at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.enable(BuiltInJvmPluginLoaderImpl.kt:305)
at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.enable(BuiltInJvmPluginLoaderImpl.kt:35)
at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt)
at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt:50)
at net.mamoe.mirai.console.plugin.PluginManager.enablePlugin(PluginManager.kt:173)
at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.enableAllLoadedPlugins$mirai_console(PluginManagerImpl.kt:175)
at net.mamoe.mirai.console.internal.MiraiConsoleImplementationBridge.doStart$mirai_console(MiraiConsoleImplementationBridge.kt:336)
at net.mamoe.mirai.console.MiraiConsoleImplementation$Companion.start(MiraiConsoleImplementation.kt:508)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon(MiraiConsoleTerminalLoader.kt:177)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon$default(MiraiConsoleTerminalLoader.kt:176)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.main(MiraiConsoleTerminalLoader.kt:54)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.itxtech.mcl.Utility.bootJars(Utility.java:86)
at org.itxtech.mcl.Utility.bootJars(Utility.java:76)
at org.itxtech.mcl.Utility.bootMirai(Utility.java:98)
at org.itxtech.mcl.module.builtin.Boot.boot(Boot.java:113)
at org.itxtech.mcl.module.ModuleManager.phaseBoot(ModuleManager.java:123)
at org.itxtech.mcl.Loader.lambda$start$4(Loader.java:196)
at org.itxtech.mcl.Loader.tryCatching(Loader.java:151)
at org.itxtech.mcl.Loader.start(Loader.java:196)
at org.itxtech.mcl.Loader.main(Loader.java:84)
Caused by: java.lang.NoClassDefFoundError: io.ktor.client.plugins.contentnegotiation.ContentNegotiation
at mirai-openai-plugin-1.0.4.jar//xyz.cssxsh.openai.OpenAiClient$http$1.invoke(OpenAiClient.kt:28)
at mirai-openai-plugin-1.0.4.jar//xyz.cssxsh.openai.OpenAiClient$http$1.invoke(OpenAiClient.kt:27)
at legacy-compatibility-layer//io.ktor.client.HttpClientKt.HttpClient(HttpClient.kt:41)
at mirai-openai-plugin-1.0.4.jar//xyz.cssxsh.openai.OpenAiClient.<init>(OpenAiClient.kt:27)
at mirai-openai-plugin-1.0.4.jar//xyz.cssxsh.mirai.openai.MiraiOpenAiListener.<clinit>(MiraiOpenAiListener.kt:27)
at java.base/java.lang.Class.forNameImpl(Native Method)
at java.base/java.lang.Class.forName(Unknown Source)
at net.mamoe.mirai.console.internal.util.PluginServiceHelper.loadService(PluginServiceHelper.kt:51)
... 31 more
Caused by: java.lang.ClassNotFoundException: io.ktor.client.plugins.contentnegotiation.ContentNegotiation
at java.base/java.net.URLClassLoader.findClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClassHelper(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at net.mamoe.mirai.console.internal.plugin.JvmPluginClassLoaderN.loadClass(JvmPluginClassLoader.kt:435)
... 39 more
mirai版本2.13.4,插件版本1.3.4
==================================[ Mirai consosle 2.13.4 ]===================================
__ __ __ __ ______ __
| \ / \ \ | \/ \ | \
| ▓▓\ / ▓▓\▓▓ ______ ______ \▓▓ ▓▓▓▓▓▓\ ______ _______ _______ ______ | ▓▓ ______
| ▓▓▓\ / ▓▓▓ \/ \ | \| \ ▓▓ \▓▓/ \| \ / \/ \| ▓▓/ \
| ▓▓▓▓\ ▓▓▓▓ ▓▓ ▓▓▓▓▓▓\ \▓▓▓▓▓▓\ ▓▓ ▓▓ | ▓▓▓▓▓▓\ ▓▓▓▓▓▓▓\ ▓▓▓▓▓▓▓ ▓▓▓▓▓▓\ ▓▓ ▓▓▓▓▓▓\
| ▓▓\▓▓ ▓▓ ▓▓ ▓▓ ▓▓ \▓▓/ ▓▓ ▓▓ ▓▓ __| ▓▓ | ▓▓ ▓▓ | ▓▓\▓▓ \| ▓▓ | ▓▓ ▓▓ ▓▓ ▓▓
| ▓▓ \▓▓▓| ▓▓ ▓▓ ▓▓ | ▓▓▓▓▓▓▓ ▓▓ ▓▓__/ \ ▓▓__/ ▓▓ ▓▓ | ▓▓_\▓▓▓▓▓▓\ ▓▓__/ ▓▓ ▓▓ ▓▓▓▓▓▓▓▓
| ▓▓ \▓ | ▓▓ ▓▓ ▓▓ \▓▓ ▓▓ ▓▓\▓▓ ▓▓\▓▓ ▓▓ ▓▓ | ▓▓ ▓▓\▓▓ ▓▓ ▓▓\▓▓ \
\▓▓ \▓▓\▓▓\▓▓ \▓▓▓▓▓▓▓\▓▓ \▓▓▓▓▓▓ \▓▓▓▓▓▓ \▓▓ \▓▓\▓▓▓▓▓▓▓ \▓▓▓▓▓▓ \▓▓ \▓▓▓▓▓▓▓
2023-03-23 10:17:51 I/main: Backend: version 2.13.4, built on 2023-01-21 21:19:40.
2023-03-23 10:17:51 I/main: Frontend Terminal: version 2.13.4, provided by Mamoe Technologies
2023-03-23 10:17:51 I/main: Welcome to visit https://mirai.mamoe.net/
2023-03-23 10:17:51 W/stderr: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
2023-03-23 10:17:51 W/stderr: SLF4J: Defaulting to no-operation (NOP) logger implementation
2023-03-23 10:17:51 W/stderr: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
2023-03-23 10:17:51 E/main: Failed to init MiraiConsole.
net.mamoe.mirai.console.internal.util.ServiceLoadException: Could not load service xyz.cssxsh.mirai.openai.MiraiOpenAiPlugin.
at net.mamoe.mirai.console.internal.util.PluginServiceHelper.loadService(PluginServiceHelper.kt:60)
at net.mamoe.mirai.console.internal.util.PluginServiceHelper.loadAllServices(PluginServiceHelper.kt:42)
at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl$extractPlugins$findAllInstances$2.invoke(BuiltInJvmPluginLoaderImpl.kt:197)
at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl$extractPlugins$findAllInstances$2.invoke(BuiltInJvmPluginLoaderImpl.kt:192)
at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
at kotlin.sequences.FlatteningSequence$iterator$1.ensureItemIterator(Sequences.kt:314)
at kotlin.sequences.FlatteningSequence$iterator$1.hasNext(Sequences.kt:303)
at kotlin.sequences.TransformingSequence$iterator$1.hasNext(Sequences.kt:214)
at kotlin.sequences.TransformingSequence$iterator$1.hasNext(Sequences.kt:214)
at kotlin.sequences.FlatteningSequence$iterator$1.ensureItemIterator(Sequences.kt:307)
at kotlin.sequences.FlatteningSequence$iterator$1.hasNext(Sequences.kt:303)
at kotlin.sequences.SequencesKt___SequencesKt.toCollection(_Sequences.kt:787)
at kotlin.sequences.SequencesKt___SequencesKt.toSet(_Sequences.kt:828)
at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.extractPlugins(BuiltInJvmPluginLoaderImpl.kt:218)
at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.listPlugins(BuiltInJvmPluginLoaderImpl.kt:67)
at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.listPlugins(JvmPluginLoader.kt)
at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.listAndSortAllPlugins(PluginManagerImpl.kt:189)
at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.findAndSortAllPluginsUsingBuiltInLoaders(PluginManagerImpl.kt:135)
at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.loadAllPluginsUsingBuiltInLoaders$mirai_console(PluginManagerImpl.kt:145)
at net.mamoe.mirai.console.internal.MiraiConsoleImplementationBridge.doStart$mirai_console(MiraiConsoleImplementationBridge.kt:279)
at net.mamoe.mirai.console.MiraiConsoleImplementation$Companion.start(MiraiConsoleImplementation.kt:508)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon(MiraiConsoleTerminalLoader.kt:177)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon$default(MiraiConsoleTerminalLoader.kt:176)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.main(MiraiConsoleTerminalLoader.kt:54)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.itxtech.mcl.Utility.bootJars(Utility.java:86)
at org.itxtech.mcl.Utility.bootJars(Utility.java:76)
at org.itxtech.mcl.Utility.bootMirai(Utility.java:98)
at org.itxtech.mcl.module.builtin.Boot.boot(Boot.java:113)
at org.itxtech.mcl.module.ModuleManager.phaseBoot(ModuleManager.java:123)
at org.itxtech.mcl.Loader.lambda$start$4(Loader.java:196)
at org.itxtech.mcl.Loader.tryCatching(Loader.java:151)
at org.itxtech.mcl.Loader.start(Loader.java:196)
at org.itxtech.mcl.Loader.main(Loader.java:84)
Caused by: java.lang.NoSuchMethodError: net.mamoe.mirai.console.plugin.jvm.AbstractJvmPlugin.access$services(Lnet/mamoe/mirai/console/plugin/jvm/AbstractJvmPlugin;Lkotlin/reflect/KClass;)Lkotlin/Lazy;
at mirai-openai-plugin-1.3.4.mirai2.jar//xyz.cssxsh.mirai.openai.MiraiOpenAiPlugin.<clinit>(MiraiOpenAiPlugin.kt:115)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:398)
at net.mamoe.mirai.console.internal.util.PluginServiceHelper.loadService(PluginServiceHelper.kt:51)
... 36 more
尝试过使用指令下载也试过直接下载后丢进plugins 均出现这个问题
io.ktor.serialization.JsonConvertException: Illegal input at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.serialization.kotlinx.KotlinxSerializationConverter.deserialize(KotlinxSerializationConverter.kt:79) at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.serialization.kotlinx.KotlinxSerializationConverter$deserialize$1.invokeSuspend(KotlinxSerializationConverter.kt) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) 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: kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 434: Encountered an unknown key 'system_fingerprint' at path: $.usage Use 'ignoreUnknownKeys = true' in 'Json {}' builder to ignore unknown keys. JSON input: ..... "total_tokens": 441 }, "system_fingerprint": "fp_a24b4..... at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:24) at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:32) at kotlinx.serialization.json.internal.AbstractJsonLexer.fail(AbstractJsonLexer.kt:584) at kotlinx.serialization.json.internal.AbstractJsonLexer.failOnUnknownKey(AbstractJsonLexer.kt:579) at kotlinx.serialization.json.internal.StreamingJsonDecoder.handleUnknown(StreamingJsonDecoder.kt:251) at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeObjectIndex(StreamingJsonDecoder.kt:237) at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeElementIndex(StreamingJsonDecoder.kt:172) at mirai-openai-plugin-1.5.1.mirai2.jar//xyz.cssxsh.openai.chat.ChatInfo$$serializer.deserialize(ChatInfo.kt:6) at mirai-openai-plugin-1.5.1.mirai2.jar//xyz.cssxsh.openai.chat.ChatInfo$$serializer.deserialize(ChatInfo.kt:6) at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:70) at kotlinx.serialization.json.Json.decodeFromString(Json.kt:97) at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.serialization.kotlinx.KotlinxSerializationConverter.deserialize(KotlinxSerializationConverter.kt:71) ... 7 more
大佬能不能加个白名单,因为群打卡获得tokens在bot别人的群也会触发QAQ
2023-01-09 18:41:24 D/MiraiOpenAiListener: 聊天已终止
2023-01-09 18:41:24 W/MiraiOpenAiListener: MiraiOpenAiListener with GroupMessageEvent(group=182850795, senderName=XIAYM+=1145141919810, sender=3032396387, permission=ADMINISTRATOR, message=[mirai:source:ids=[109065], internalIds=[1033744511], from group 3032396387 to 182850795 at 1673260879]chat)
javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:128)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:321)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:259)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1329)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.onConsumeCertificate(CertificateMessage.java:1204)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.consume(CertificateMessage.java:1151)
at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:444)
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:421)
at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:178)
at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152)
at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
at mirai-openai-plugin-1.0.7.mirai2.jar[private]//okhttp3.internal.connection.RealConnection.connectTls(RealConnection.kt:379)
at mirai-openai-plugin-1.0.7.mirai2.jar[private]//okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.kt:337)
at mirai-openai-plugin-1.0.7.mirai2.jar[private]//okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:209)
at mirai-openai-plugin-1.0.7.mirai2.jar[private]//okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
at mirai-openai-plugin-1.0.7.mirai2.jar[private]//okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
at mirai-openai-plugin-1.0.7.mirai2.jar[private]//okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
at mirai-openai-plugin-1.0.7.mirai2.jar[private]//okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
at mirai-openai-plugin-1.0.7.mirai2.jar[private]//okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
at mirai-openai-plugin-1.0.7.mirai2.jar[private]//okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at mirai-openai-plugin-1.0.7.mirai2.jar[private]//okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
at mirai-openai-plugin-1.0.7.mirai2.jar[private]//okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at mirai-openai-plugin-1.0.7.mirai2.jar[private]//okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
at mirai-openai-plugin-1.0.7.mirai2.jar[private]//okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at mirai-openai-plugin-1.0.7.mirai2.jar[private]//okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
at mirai-openai-plugin-1.0.7.mirai2.jar[private]//okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at mirai-openai-plugin-1.0.7.mirai2.jar[private]//okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
at mirai-openai-plugin-1.0.7.mirai2.jar[private]//okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:517)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385)
at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:290)
at java.base/sun.security.validator.Validator.validate(Validator.java:264)
at java.base/sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:321)
at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:221)
at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:129)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1313)
... 30 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)
... 36 more
2023-12-05 02:35:37 V/Bot.111111111: [XXXXXXXXX(XXXXXXX)] 11111(XXXXX) -> caht你活着没
2023-12-05 02:35:39 W/MiraiOpenAiListener: MiraiOpenAiListener with GroupMessageEvent(group=1111111, senderName=使用人, sender=1111111, permission=MEMBER, message=[mirai:source:ids=[2967377], internalIds=[-1055959051], from group 1111111 to XXXXX at 1701714936]caht你活着没)
io.ktor.serialization.JsonConvertException: Illegal input
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.serialization.kotlinx.KotlinxSerializationConverter.deserialize(KotlinxSerializationConverter.kt:79)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.serialization.ContentConverterKt$deserialize$$inlined$map$1$2.emit(Emitters.kt:224)
at kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$3.collect(SafeCollector.common.kt:115)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.serialization.ContentConverterKt$deserialize$$inlined$map$1.collect(SafeCollector.common.kt:113)
at kotlinx.coroutines.flow.FlowKt__ReduceKt.firstOrNull(Reduce.kt:243)
at kotlinx.coroutines.flow.FlowKt.firstOrNull(Unknown Source)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.serialization.ContentConverterKt.deserialize(ContentConverter.kt:128)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.plugins.contentnegotiation.ContentNegotiation.convertResponse$ktor_client_content_negotiation(ContentNegotiation.kt:185)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.plugins.contentnegotiation.ContentNegotiation$Plugin$install$2.invokeSuspend(ContentNegotiation.kt:210)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.plugins.contentnegotiation.ContentNegotiation$Plugin$install$2.invoke(ContentNegotiation.kt)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.plugins.contentnegotiation.ContentNegotiation$Plugin$install$2.invoke(ContentNegotiation.kt)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:123)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:81)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.HttpClient$4.invokeSuspend(HttpClient.kt:177)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.HttpClient$4.invoke(HttpClient.kt)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.HttpClient$4.invoke(HttpClient.kt)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:123)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:81)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.proceedWith(SuspendFunctionGun.kt:91)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.plugins.compression.ContentEncoding$Companion$install$2.invokeSuspend(ContentEncoding.kt:144)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.plugins.compression.ContentEncoding$Companion$install$2.invoke(ContentEncoding.kt)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.plugins.compression.ContentEncoding$Companion$install$2.invoke(ContentEncoding.kt)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:123)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:81)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.proceedWith(SuspendFunctionGun.kt:91)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.plugins.HttpCallValidator$Companion$install$2.invokeSuspend(HttpCallValidator.kt:138)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.plugins.HttpCallValidator$Companion$install$2.invoke(HttpCallValidator.kt)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.plugins.HttpCallValidator$Companion$install$2.invoke(HttpCallValidator.kt)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:123)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:81)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.execute$ktor_utils(SuspendFunctionGun.kt:101)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:77)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.call.HttpClientCall.bodyNullable(HttpClientCall.kt:88)
at mirai-openai-plugin-1.5.1.mirai2.jar//xyz.cssxsh.openai.chat.ChatController.create(ChatController.kt:55)
at mirai-openai-plugin-1.5.1.mirai2.jar//xyz.cssxsh.openai.chat.ChatController$create$1.invokeSuspend(ChatController.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
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: kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 440: Encountered an unknown key 'system_fingerprint' at path: $.usage
Use 'ignoreUnknownKeys = true' in 'Json {}' builder to ignore unknown keys.
JSON input: ..... "total_tokens": 56
},
"system_fingerprint": "fp_eeff1.....
at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:24)
at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:32)
at kotlinx.serialization.json.internal.AbstractJsonLexer.fail(AbstractJsonLexer.kt:584)
at kotlinx.serialization.json.internal.AbstractJsonLexer.failOnUnknownKey(AbstractJsonLexer.kt:579)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.handleUnknown(StreamingJsonDecoder.kt:251)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeObjectIndex(StreamingJsonDecoder.kt:237)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeElementIndex(StreamingJsonDecoder.kt:172)
at mirai-openai-plugin-1.5.1.mirai2.jar//xyz.cssxsh.openai.chat.ChatInfo$$serializer.deserialize(ChatInfo.kt:6)
at mirai-openai-plugin-1.5.1.mirai2.jar//xyz.cssxsh.openai.chat.ChatInfo$$serializer.deserialize(ChatInfo.kt:6)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:70)
at kotlinx.serialization.json.Json.decodeFromString(Json.kt:97)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.serialization.k
otlinx.KotlinxSerializationConverter.deserialize(KotlinxSerializationConverter.kt:71)
... 70 more
一直用得好好的,突然这几天报错了,也没去动过配置文件,提子也是正常的
stop 会与默认的stop 停止bot冲突导致bot被关停。
在命令前缀被取消的情况下。
希望群打卡获取的tonkens能自定义
请问有哪些文字转语音的插件和包能够和现有的chat功能结合,从而可以添加语音回答功能。
有没有可能让这个插件兼容ChatGLM的API?使用openai经常会有次数上限限制,我想将模型换成ChatGLM-6B在本地运行,但是找不到什么好的方法和mirai互联(因为我不会java)
ChatGLM的API格式:ChatGLM-6B#api部署
重新翻看了一下这个插件的配置和使用,或许我并不应该在这里请求这个功能...但是相关插件只有这几个了,如果不行请直接关闭issue,打扰了。
(在群聊里)比如停止聊天,重载配置,所有的内容都直接输入到OpenAI的API里了
Mirai 版本:2.15.0
插件版本:v1.5.1
系统版本:Ubuntu 20.04 LTS
本地部署了 Clash,插件通过 socks://127.0.0.1:7891
连接代理服务器,之前一段时间的使用一直正常。从前天开始,发现无法正常返回 OpenAI 的信息.
查看控制台,报错如下:
2023-08-24 20:37:50 W/MiraiOpenAiListener: MiraiOpenAiListener with GroupMessageEvent(group=*****, senderName=*****, sender=*****, permission=ADMINISTRATOR, message=[mirai:source:ids=[36***], internalIds=[1018*****], from group ***** to ***** at *****]chat)
javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake
at java.base/sun.security.ssl.SSLSocketImpl.handleEOF(SSLSocketImpl.java:1714)
at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1513)
at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1420)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:455)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:426)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//okhttp3.internal.connection.RealConnection.connectTls(RealConnection.kt:379)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.kt:337)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:209)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:517)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at java.base/sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:483)
at java.base/sun.security.ssl.SSLSocketInputRecord.readHeader(SSLSocketInputRecord.java:472)
at java.base/sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:160)
at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:111)
at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1505)
... 23 more
Clash 日志输出如下:
[2023-08-24 20:37:48][INFO] [TCP] 127.0.0.1:35514 --> api.openai.com:443 match Match() using ***[🇭🇰香港 06 | 专线]
目前已经尝试过更换多个结点(这些节点均可以正常访问并使用 chat.openai.com
),以及使用最新的 Action 版本,但报错均出现,且内容一样。
2022-12-20 20:45:48 E/mirai-openai-plugin: java.lang.NoSuchMethodError: 'net.mamoe.mirai.console.plugin.jvm.JvmPluginClasspath xyz.cssxsh.mirai.openai.MiraiOpenAiPlugin.getJvmPluginClasspath()'
java.lang.NoSuchMethodError: 'net.mamoe.mirai.console.plugin.jvm.JvmPluginClasspath xyz.cssxsh.mirai.openai.MiraiOpenAiPlugin.getJvmPluginClasspath()'
at xyz.cssxsh.mirai.openai.MiraiOpenAiPlugin.access$getJvmPluginClasspath(MiraiOpenAiPlugin.kt:14)
at xyz.cssxsh.mirai.openai.MiraiOpenAiPlugin$special$$inlined$services$1.invoke(MiraiOpenAiPlugin.kt:33)
at xyz.cssxsh.mirai.openai.MiraiOpenAiPlugin$special$$inlined$services$1.invoke(MiraiOpenAiPlugin.kt:31)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at xyz.cssxsh.mirai.openai.MiraiOpenAiPlugin.getConfig(MiraiOpenAiPlugin.kt:25)
at xyz.cssxsh.mirai.openai.MiraiOpenAiPlugin.onEnable(MiraiOpenAiPlugin.kt:40)
at net.mamoe.mirai.console.internal.plugin.JvmPluginInternal.internalOnEnable$mirai_console(JvmPluginInternal.kt:113)
at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.enable(BuiltInJvmPluginLoaderImpl.kt:122)
at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt)
at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt:36)
at net.mamoe.mirai.console.plugin.PluginManager.enablePlugin(PluginManager.kt:129)
at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.enableAllLoadedPlugins$mirai_console(PluginManagerImpl.kt:172)
at net.mamoe.mirai.console.internal.MiraiConsoleImplementationBridge.doStart$mirai_console(MiraiConsoleImplementationBridge.kt:214)
at net.mamoe.mirai.console.MiraiConsoleImplementation$Companion.start(MiraiConsoleImplementation.kt:276)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon(MiraiConsoleTerminalLoader.kt:152)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon$default(MiraiConsoleTerminalLoader.kt:151)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.main(MiraiConsoleTerminalLoader.kt:47)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.itxtech.mcl.Utility.bootMirai(Utility.java:84)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:138)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:226)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1692)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:1013)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:412)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3578)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:107)
at org.mozilla.javascript.ArrowFunction.call(ArrowFunction.java:43)
at org.mozilla.javascript.InterfaceAdapter.invokeImpl(InterfaceAdapter.java:155)
at org.mozilla.javascript.InterfaceAdapter.lambda$invoke$0(InterfaceAdapter.java:105)
at org.mozilla.javascript.Context.call(Context.java:554)
at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:522)
at org.mozilla.javascript.InterfaceAdapter.invoke(InterfaceAdapter.java:105)
at org.mozilla.javascript.jdk18.VMBridge_jdk18$1.invoke(VMBridge_jdk18.java:126)
at com.sun.proxy.$Proxy4.run(Unknown Source)
at org.itxtech.mcl.script.ScriptManager.phaseBoot(ScriptManager.java:101)
at org.itxtech.mcl.Loader.start(Loader.java:128)
at org.itxtech.mcl.Loader.main(Loader.java:53)
启动时没有提示输入OPENAI_TOKEN,而是报了这样的错误,插件没有正常启用。config
文件夹中也没有生成相应的配置文件,请问该如何解决。
我同时还使用了MiraiNative
和PatPat
插件,但我也尝试过将这两个插件删除,单独使用该插件启动mirai,仍然报以上错误。
以下为mirai配置:
Running MiraiConsole v2.8.2, built on 2021-11-20 00:35:26.
Frontend Terminal: version 2.8.2, provided by Mamoe Technologies
Permission Service: Built In Permission Service
Plugins: PatPat v2.0.1, MiraiNative v2.0.5-cp, mirai-openai-plugin v1.0.6
啥时候可以增加system角色功能呢
io.ktor.serialization.JsonConvertException: Illegal input
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.serialization.kotlinx.KotlinxSerializationConverter.deserialize(KotlinxSerializationConverter.kt:79)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.serialization.kotlinx.KotlinxSerializationConverter$deserialize$1.invokeSuspend(KotlinxSerializationConverter.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
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: kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 404: Encountered an unknown key 'system_fingerprint' at path: $.usage
Use 'ignoreUnknownKeys = true' in 'Json {}' builder to ignore unknown keys.
JSON input: ..... "total_tokens": 38
},
"system_fingerprint": null
}
at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:24)
at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:32)
at kotlinx.serialization.json.internal.AbstractJsonLexer.fail(AbstractJsonLexer.kt:584)
at kotlinx.serialization.json.internal.AbstractJsonLexer.failOnUnknownKey(AbstractJsonLexer.kt:579)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.handleUnknown(StreamingJsonDecoder.kt:251)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeObjectIndex(StreamingJsonDecoder.kt:237)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeElementIndex(StreamingJsonDecoder.kt:172)
at mirai-openai-plugin-1.5.1.mirai2.jar//xyz.cssxsh.openai.chat.ChatInfo$$serializer.deserialize(ChatInfo.kt:6)
at mirai-openai-plugin-1.5.1.mirai2.jar//xyz.cssxsh.openai.chat.ChatInfo$$serializer.deserialize(ChatInfo.kt:6)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:70)
at kotlinx.serialization.json.Json.decodeFromString(Json.kt:97)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.serialization.kotlinx.KotlinxSerializationConverter.deserialize(KotlinxSerializationConverter.kt:71)
... 7 more
报错内容如上
此前1.2.1版本好像能正常使用(因为一直没更新)
尝试换GPT4的时候出现的报错,随后更新了一下插件到1.5.1版,报错依旧
已经排查过的问题:API有效,对应OpenAI账户有效且有余额,代理设置正确,尝试清理插件对应config并重装插件后失败
未尝试过的操作:重启服务器
插件版本:mirai-openai-plugin-1.5.1.mirai2.jar
以下是log:
2023-11-07 12:26:29 V/Bot.: &水() -> 来聊
2023-11-07 12:26:29 V/Bot.: Friend() <- [mirai:quote:[mirai:source:ids=[], internalIds=[], from friend to at ], content=来聊]聊天将开始
2023-11-07 12:26:42 V/Bot.: &水() -> 你的数据是几时的
2023-11-07 12:26:54 W/MiraiOpenAiListener: MiraiOpenAiListener with FriendMessageEvent(sender=, message=[mirai:source:ids=[], internalIds=[], from friend to at ]来聊)
io.ktor.serialization.JsonConvertException: Illegal input
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.serialization.kotlinx.KotlinxSerializationConverter.deserialize(KotlinxSerializationConverter.kt:79)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.serialization.kotlinx.KotlinxSerializationConverter$deserialize$1.invokeSuspend(KotlinxSerializationConverter.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
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: kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 489: Encountered an unknown key 'system_fingerprint' at path: $.usage
Use 'ignoreUnknownKeys = true' in 'Json {}' builder to ignore unknown keys.
JSON input: ..... "total_tokens": 105
},
"system_fingerprint": "fp_a24b4.....
at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:24)
at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:32)
at kotlinx.serialization.json.internal.AbstractJsonLexer.fail(AbstractJsonLexer.kt:584)
at kotlinx.serialization.json.internal.AbstractJsonLexer.failOnUnknownKey(AbstractJsonLexer.kt:579)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.handleUnknown(StreamingJsonDecoder.kt:251)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeObjectIndex(StreamingJsonDecoder.kt:237)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeElementIndex(StreamingJsonDecoder.kt:172)
at mirai-openai-plugin-1.5.1.mirai2.jar//xyz.cssxsh.openai.chat.ChatInfo$$serializer.deserialize(ChatInfo.kt:6)
at mirai-openai-plugin-1.5.1.mirai2.jar//xyz.cssxsh.openai.chat.ChatInfo$$serializer.deserialize(ChatInfo.kt:6)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:70)
at kotlinx.serialization.json.Json.decodeFromString(Json.kt:97)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.serialization.kotlinx.KotlinxSerializationConverter.deserialize(KotlinxSerializationConverter.kt:71)
... 7 more
2023-11-07 12:26:55 V/Bot.: Friend(66487630) <- [mirai:quote:[mirai:source:ids=[], internalIds=[], from friend to at ], content=来聊]聊天已终止
bind 猫娘之后能不能取消这个设定
可以整一个unbind
指令,修改prompts.yml
解除对AI设定的预置并openai-reload
一下
希望可以设置全局人格,不需要绑定
建议给bot回复消息增加一个分段发送的选项,太长的一段观感不好,而且回复消息太长时,等待回复时间长体验不好
我填写http://127.0.0.1:7890无效, 代理能正常ping通的
立即开始聊天不会加载预设
大佬,希望可以给整个群绑定预设。
在群内使用聊天模式时,希望使用 @机器人 或 回复机器人 的方式触发,而不是每句话都给与回复。
如图,群聊中测试使用问答模型后输出不完整
这是后台报错代码:
2023-04-09 01:45:22 V/Bot.1639275564: [后台ai线报测试群(273068320)] 空恋(1839275564) -> ?
2023-04-09 01:45:22 W/MiraiOpenAiListener: MiraiOpenAiListener with GroupMessageEvent(group=273068320, senderName=空恋, sender=1839275564, permission=OWNER, message=[mirai:source:ids=[52253], internalIds=[1386621445], from group 1839275564 to 273068320 at 1680975870]蓝白我需要你的帮助!)
java.lang.IllegalArgumentException: message is empty
at net.mamoe.mirai.internal.contact.AbstractUserKt.sendMessageImpl(AbstractUser.kt:258)
at net.mamoe.mirai.internal.contact.CommonGroupImpl.sendMessage$suspendImpl(GroupImpl.kt:219)
at net.mamoe.mirai.internal.contact.CommonGroupImpl.sendMessage(GroupImpl.kt)
at mirai-openai-plugin-1.4.2.mirai2.jar//xyz.cssxsh.mirai.openai.MiraiOpenAiListener$question$6$2.invokeSuspend(MiraiOpenAiListener.kt:343)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
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)
请问一下我该如何解决该报错?
https://github.com/chatanywhere/GPT_API_free
可以通过一些转发网站实现免费试用,或者国内直连
有些场合代理不太方便
如题所示。
openai新增了调用gpt-3.5-turbo(chatgpt模型)的选项,花费低还强大,但只能通过https://api.openai.com/v1/chat/completions调用
使用v1/completions会报错
2023-03-30 10:23:23 W/MiraiOpenAiListener: MiraiOpenAiListener with GroupMessageEvent(group=809508660, senderName=透透羽宝, sender=1065005382, permission=MEMBER, message=[mirai:source:ids=[825893], internalIds=[1323162258], from group 1065005382 to 809508660 at 1680142913]chat)
io.ktor.client.call.NoTransformationFoundException: No transformation found: class io.ktor.utils.io.ByteBufferChannel -> class xyz.cssxsh.openai.ErrorInfoWrapper
with response from https://api.openai.com/v1/chat/completions:
status: 421
response headers:
cf-ray: 7afce3e92cf09fa9-SIN
, content-length: 573
, content-type: text/html
, date: Thu, 30 Mar 2023 02:23:23 GMT
, server: cloudflare
at mirai-openai-plugin-1.4.0.mirai2.jar[private]//io.ktor.client.call.HttpClientCall.bodyNullable(HttpClientCall.kt:93)
at mirai-openai-plugin-1.4.0.mirai2.jar//xyz.cssxsh.openai.OpenAiClient$http$1$4$1.invokeSuspend(OpenAiClient.kt:108)
at mirai-openai-plugin-1.4.0.mirai2.jar//xyz.cssxsh.openai.OpenAiClient$http$1$4$1.invoke(OpenAiClient.kt)
at mirai-openai-plugin-1.4.0.mirai2.jar//xyz.cssxsh.openai.OpenAiClient$http$1$4$1.invoke(OpenAiClient.kt)
at mirai-openai-plugin-1.4.0.mirai2.jar[private]//io.ktor.client.plugins.HttpCallValidator.validateResponse(HttpCallValidator.kt:47)
at mirai-openai-plugin-1.4.0.mirai2.jar[private]//io.ktor.client.plugins.HttpCallValidator.access$validateResponse(HttpCallValidator.kt:40)
at mirai-openai-plugin-1.4.0.mirai2.jar[private]//io.ktor.client.plugins.HttpCallValidator$Companion$install$3.invokeSuspend(HttpCallValidator.kt:148)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at mirai-openai-plugin-1.4.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
at mirai-openai-plugin-1.4.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
at mirai-openai-plugin-1.4.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
at mirai-openai-plugin-1.4.0.mirai2.jar[private]//io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
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)
2023-03-30 10:23:23 V/Bot.2782268437: Group(809508660) <- [mirai:quote:[mirai:source:ids=[825893], internalIds=[1323162258], from group 1065005382 to 809508660 at 1680142913], content=chat]聊天已终止
更改API后问题仍然存在
能否添加对gpt-4-vision-preview
的支持?
2023-11-08 14:29:34 V/Bot.: &() -> 来聊
2023-11-08 14:29:35 W/MiraiOpenAiListener: MiraiOpenAiListener with FriendMessageEvent(sender=, message=[mirai:source:ids=[4883], internalIds=[1404953672], from friend to at 1699424974]来聊)
xyz.cssxsh.openai.OpenAiException: ErrorInfo(code=null, message="[] is too short - 'tools'", param=null, type=invalid_request_error)
at mirai-openai-plugin-1.5.1.mirai2.jar//xyz.cssxsh.openai.OpenAiClient$http$1$4$1.invokeSuspend(OpenAiClient.kt:60)
at mirai-openai-plugin-1.5.1.mirai2.jar//xyz.cssxsh.openai.OpenAiClient$http$1$4$1.invoke(OpenAiClient.kt)
at mirai-openai-plugin-1.5.1.mirai2.jar//xyz.cssxsh.openai.OpenAiClient$http$1$4$1.invoke(OpenAiClient.kt)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.plugins.HttpCallValidator.validateResponse(HttpCallValidator.kt:51)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.plugins.HttpCallValidator.access$validateResponse(HttpCallValidator.kt:43)
at mirai-openai-plugin-1.5.1.mirai2.jar[private]//io.ktor.client.plugins.HttpCallValidator$Companion$install$3.invokeSuspend(HttpCallValidator.kt:152)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
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)
2023-11-08 14:29:36 V/Bot.: Friend() <- [mirai:quote:[mirai:source:ids=[4883], internalIds=[1404953672], from friend to at 1699424974], content=来聊]OpenAI API 异常, ErrorInfo(code=null, message="[] is too short - 'tools'", param=null, type=invalid_request_error)
java.lang.IllegalArgumentException: message is empty
at net.mamoe.mirai.internal.contact.AbstractUserKt.sendMessageImpl(AbstractUser.kt:258)
at net.mamoe.mirai.internal.contact.FriendImpl.sendMessage(FriendImpl.kt:102)
at mirai-openai-plugin-1.2.0.mirai2.jar//xyz.cssxsh.mirai.openai.MiraiOpenAiListener$chat$4$2.invokeSuspend(MiraiOpenAiListener.kt:206)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
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)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.