Skip to content

Commit 5202209

Browse files
committed
Fix output content in Responses
1 parent 5d70745 commit 5202209

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Sources/OpenAI/Responses/ResponsesResponse.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public extension Responses {
9393
if output.type == "message" {
9494
partialResult += output.content.reduce(into: "") { contentPartialResult, content in
9595
if content.type == "output_text" {
96-
contentPartialResult += content.text
96+
contentPartialResult += content.text ?? ""
9797
}
9898
}
9999
}
@@ -113,7 +113,7 @@ public extension Responses {
113113

114114
public struct Content: Decodable, Sendable {
115115
public let type: String
116-
public let text: String
116+
public let text: String?
117117
}
118118
}
119119

0 commit comments

Comments
 (0)