Skip to content

Commit 25f93ee

Browse files
authored
Merge pull request #149 from frogcjn/patch-1
trimming contentString
2 parents 60dfce4 + c271966 commit 25f93ee

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/OpenAI/Private/StreamingSession.swift

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ extension StreamingSession {
6161
return
6262
}
6363
let jsonObjects = "\(previousChunkBuffer)\(stringContent)"
64+
.trimmingCharacters(in: .whitespacesAndNewlines)
6465
.components(separatedBy: "data:")
6566
.map { $0.trimmingCharacters(in: .whitespacesAndNewlines) }
6667
.filter { $0.isEmpty == false }

0 commit comments

Comments
 (0)