We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 60dfce4 + c271966 commit 25f93eeCopy full SHA for 25f93ee
Sources/OpenAI/Private/StreamingSession.swift
@@ -61,6 +61,7 @@ extension StreamingSession {
61
return
62
}
63
let jsonObjects = "\(previousChunkBuffer)\(stringContent)"
64
+ .trimmingCharacters(in: .whitespacesAndNewlines)
65
.components(separatedBy: "data:")
66
.map { $0.trimmingCharacters(in: .whitespacesAndNewlines) }
67
.filter { $0.isEmpty == false }
0 commit comments