@@ -2,7 +2,6 @@ package com.aallam.openai.api.message
2
2
3
3
import com.aallam.openai.api.BetaOpenAI
4
4
import com.aallam.openai.api.core.Role
5
- import com.aallam.openai.api.file.FileId
6
5
import kotlinx.serialization.SerialName
7
6
import kotlinx.serialization.Serializable
8
7
@@ -22,6 +21,11 @@ public class MessageRequest(
22
21
*/
23
22
@SerialName(" content" ) public val content : String ,
24
23
24
+ /* *
25
+ * A list of files attached to the message.
26
+ */
27
+ @SerialName(" attachments" ) public val attachments : List <Attachment >? = null ,
28
+
25
29
/* *
26
30
* Set of 16 key-value pairs that can be attached to an object.
27
31
* This can be useful for storing additional information about the object in a structured format.
@@ -52,6 +56,11 @@ public class MessageRequestBuilder {
52
56
*/
53
57
public var content: String? = null
54
58
59
+ /* *
60
+ * A list of files attached to the message.
61
+ */
62
+ public var attachments: List <Attachment >? = null
63
+
55
64
/* *
56
65
* Set of 16 key-value pairs that can be attached to an object.
57
66
* This can be useful for storing additional information about the object in a structured format.
@@ -62,6 +71,7 @@ public class MessageRequestBuilder {
62
71
public fun build (): MessageRequest = MessageRequest (
63
72
role = requireNotNull(role) { " role is required" },
64
73
content = requireNotNull(content) { " content is required" },
74
+ attachments = attachments,
65
75
metadata = metadata
66
76
)
67
77
}
0 commit comments