@@ -2,7 +2,6 @@ package com.aallam.openai.api.message
22
33import com.aallam.openai.api.BetaOpenAI
44import com.aallam.openai.api.core.Role
5- import com.aallam.openai.api.file.FileId
65import kotlinx.serialization.SerialName
76import kotlinx.serialization.Serializable
87
@@ -22,6 +21,11 @@ public class MessageRequest(
2221 */
2322 @SerialName(" content" ) public val content : String ,
2423
24+ /* *
25+ * A list of files attached to the message.
26+ */
27+ @SerialName(" attachments" ) public val attachments : List <Attachment >? = null ,
28+
2529 /* *
2630 * Set of 16 key-value pairs that can be attached to an object.
2731 * This can be useful for storing additional information about the object in a structured format.
@@ -52,6 +56,11 @@ public class MessageRequestBuilder {
5256 */
5357 public var content: String? = null
5458
59+ /* *
60+ * A list of files attached to the message.
61+ */
62+ public var attachments: List <Attachment >? = null
63+
5564 /* *
5665 * Set of 16 key-value pairs that can be attached to an object.
5766 * This can be useful for storing additional information about the object in a structured format.
@@ -62,6 +71,7 @@ public class MessageRequestBuilder {
6271 public fun build (): MessageRequest = MessageRequest (
6372 role = requireNotNull(role) { " role is required" },
6473 content = requireNotNull(content) { " content is required" },
74+ attachments = attachments,
6575 metadata = metadata
6676 )
6777}
0 commit comments