cssxsh / mirai-openai-plugin

Mirai Console OpenAI ChatBot 插件
GNU Affero General Public License v3.0
130 stars 14 forks source link

使用新模型时出现错误 #45

Closed MClengchuan closed 1 year ago

MClengchuan commented 1 year ago

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

cssxsh commented 1 year ago

你们从来不看自己写的东西吗 格式这么乱,故意来累我眼睛的吧

cssxsh commented 1 year ago

https://github.com/cssxsh/mirai-openai-plugin/issues/42