diff --git a/CHANGELOG.md b/CHANGELOG.md index e80de41..41c08d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.5.1 (23/04/19) + +1. feat: handle OpenAiException +2. feat: config show_exception + ## 1.5.0 (23/04/11) 1. fix: Empty to ... diff --git a/build.gradle.kts b/build.gradle.kts index 53b8b24..3a670d5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,7 +7,7 @@ plugins { } group = "xyz.cssxsh.mirai" -version = "1.5.0" +version = "1.5.1" mavenCentralPublish { useCentralS01() diff --git a/src/main/kotlin/xyz/cssxsh/mirai/openai/MiraiOpenAiListener.kt b/src/main/kotlin/xyz/cssxsh/mirai/openai/MiraiOpenAiListener.kt index 7ff4f0b..bcfa175 100644 --- a/src/main/kotlin/xyz/cssxsh/mirai/openai/MiraiOpenAiListener.kt +++ b/src/main/kotlin/xyz/cssxsh/mirai/openai/MiraiOpenAiListener.kt @@ -154,7 +154,7 @@ internal object MiraiOpenAiListener : SimpleListenerHost() { event.subject.sendMessage(buildMessageChain { add(event.message.quote()) - append("Usage: ").append(completion.usage.totalTokens.toString()) + append("Usage: ").append(completion.usage.totalTokens.toString()).append('\n') for (choice in completion.choices) { append("Choice.").append(choice.index.toString()).append(" FinishReason: ").append(choice.finishReason) if (choice.text.firstOrNull() != '\n') append('\n') diff --git a/src/main/kotlin/xyz/cssxsh/mirai/openai/MiraiOpenAiPlugin.kt b/src/main/kotlin/xyz/cssxsh/mirai/openai/MiraiOpenAiPlugin.kt index c4a0984..5f3937e 100644 --- a/src/main/kotlin/xyz/cssxsh/mirai/openai/MiraiOpenAiPlugin.kt +++ b/src/main/kotlin/xyz/cssxsh/mirai/openai/MiraiOpenAiPlugin.kt @@ -18,7 +18,7 @@ public object MiraiOpenAiPlugin : KotlinPlugin( JvmPluginDescription( id = "xyz.cssxsh.mirai.plugin.mirai-openai-plugin", name = "mirai-openai-plugin", - version = "1.5.0", + version = "1.5.1", ) { author("cssxsh")