From e29d802ea5b40cfa9951126a745ead8be4a540f5 Mon Sep 17 00:00:00 2001 From: "Antoine (AntoDev)" Date: Fri, 21 Jun 2024 16:17:11 +0200 Subject: [PATCH 1/2] fix 'quote' to optional field for openai compatibility assistant on FileCitation --- .../kotlin/com.aallam.openai.api/message/MessageContent.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openai-core/src/commonMain/kotlin/com.aallam.openai.api/message/MessageContent.kt b/openai-core/src/commonMain/kotlin/com.aallam.openai.api/message/MessageContent.kt index d0da1df1..81ad6fbc 100644 --- a/openai-core/src/commonMain/kotlin/com.aallam.openai.api/message/MessageContent.kt +++ b/openai-core/src/commonMain/kotlin/com.aallam.openai.api/message/MessageContent.kt @@ -107,7 +107,7 @@ public data class FileCitation( /** * The specific quote in the file */ - @SerialName("quote") val quote: String, + @SerialName("quote") val quote: String? = "", ) /** From 6d7b8e452aafcef73be234df027a21aa901b565f Mon Sep 17 00:00:00 2001 From: AntoDev Date: Sat, 20 Jul 2024 11:01:34 +0200 Subject: [PATCH 2/2] Update openai-core/src/commonMain/kotlin/com.aallam.openai.api/message/MessageContent.kt Co-authored-by: Mouaad Aallam --- .../kotlin/com.aallam.openai.api/message/MessageContent.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openai-core/src/commonMain/kotlin/com.aallam.openai.api/message/MessageContent.kt b/openai-core/src/commonMain/kotlin/com.aallam.openai.api/message/MessageContent.kt index 81ad6fbc..b7dd8bed 100644 --- a/openai-core/src/commonMain/kotlin/com.aallam.openai.api/message/MessageContent.kt +++ b/openai-core/src/commonMain/kotlin/com.aallam.openai.api/message/MessageContent.kt @@ -107,7 +107,7 @@ public data class FileCitation( /** * The specific quote in the file */ - @SerialName("quote") val quote: String? = "", + @SerialName("quote") val quote: String? = null, ) /**