File tree 1 file changed +1
-21
lines changed
Sources/OpenAI/Public/Parameters/Message
1 file changed +1
-21
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ public struct MessageParameter: Encodable {
50
50
51
51
/// Enum to represent different content parts (text, image URL, image file).
52
52
public enum ContentItem : Encodable {
53
- case text( Text )
53
+ case text( String )
54
54
case imageURL( ImageURL )
55
55
case imageFile( ImageFile )
56
56
@@ -77,26 +77,6 @@ public struct MessageParameter: Encodable {
77
77
}
78
78
}
79
79
80
- /// Struct representing a text content part.
81
- public struct Text : Encodable {
82
- let text : String
83
-
84
- public init ( text: String ) {
85
- self . text = text
86
- }
87
-
88
- enum CodingKeys : String , CodingKey {
89
- case type
90
- case text
91
- }
92
-
93
- public func encode( to encoder: Encoder ) throws {
94
- var container = encoder. container ( keyedBy: CodingKeys . self)
95
- try container. encode ( " text " , forKey: . type)
96
- try container. encode ( text, forKey: . text)
97
- }
98
- }
99
-
100
80
/// References an image URL in the content of a message.
101
81
public struct ImageURL : Encodable {
102
82
You can’t perform that action at this time.
0 commit comments