File tree Expand file tree Collapse file tree 1 file changed +1
-21
lines changed
Sources/OpenAI/Public/Parameters/Message Expand file tree Collapse file tree 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 {
5050
5151 /// Enum to represent different content parts (text, image URL, image file).
5252 public enum ContentItem : Encodable {
53- case text( Text )
53+ case text( String )
5454 case imageURL( ImageURL )
5555 case imageFile( ImageFile )
5656
@@ -77,26 +77,6 @@ public struct MessageParameter: Encodable {
7777 }
7878 }
7979
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-
10080 /// References an image URL in the content of a message.
10181 public struct ImageURL : Encodable {
10282
You can’t perform that action at this time.
0 commit comments