Skip to content

Commit 3f7a519

Browse files
committed
Responses input improvements
1 parent 05508b6 commit 3f7a519

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Sources/OpenAI/Common/Content.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
public enum Content: Encodable, Sendable {
99
case text(String)
10-
case content(InputContent)
10+
case content([InputContent])
1111

1212
public func encode(to encoder: any Encoder) throws {
1313
var container = encoder.singleValueContainer()

Sources/OpenAI/Responses/ResponsesBody.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ public extension Responses {
144144

145145
/// Text, image, or audio input to the model, used to generate a response. Can also contain
146146
/// previous assistant responses.
147-
public let content: [Content]
147+
public let content: Content
148148

149-
public init(role: Role, content: [Content]) {
149+
public init(role: Role, content: Content) {
150150
self.role = role
151151
self.content = content
152152
}

0 commit comments

Comments
 (0)