From 4308388e4a3cab32e003741a03e242b702de23f9 Mon Sep 17 00:00:00 2001 From: CoasterFreakDE Date: 2024年7月16日 13:15:33 +0200 Subject: [PATCH] fix: Implemented ChatResponseFormat Function --- build.gradle.kts | 2 +- .../kotlin/com/cjcrafter/openai/chat/ChatResponseFormat.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 266a6f8..5f5ee64 100755 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,7 +1,7 @@ import com.github.breadmoirai.githubreleaseplugin.GithubReleaseTask group = "com.cjcrafter" -version = "2.1.0" +version = "2.1.1" plugins { `java-library` diff --git a/src/main/kotlin/com/cjcrafter/openai/chat/ChatResponseFormat.kt b/src/main/kotlin/com/cjcrafter/openai/chat/ChatResponseFormat.kt index 0b4b5df..22e0f53 100755 --- a/src/main/kotlin/com/cjcrafter/openai/chat/ChatResponseFormat.kt +++ b/src/main/kotlin/com/cjcrafter/openai/chat/ChatResponseFormat.kt @@ -2,10 +2,10 @@ package com.cjcrafter.openai.chat import com.fasterxml.jackson.annotation.JsonProperty -class ChatResponseFormat { +class ChatResponseFormat(@JsonProperty("type") val type: Type = Type.TEXT) { enum class Type { - @JsonProperty("json") + @JsonProperty("json_object") JSON, @JsonProperty("text") TEXT

AltStyle によって変換されたページ (->オリジナル) /