We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1cd6a2c commit a516b22Copy full SHA for a516b22
lib/openai/http.rb
@@ -49,7 +49,7 @@ def to_json(string)
49
# If the JSON object for a given data or error message is invalid, it is ignored.
50
#
51
# @param user_proc [Proc] The inner proc to call for each JSON object in the chunk.
52
- # @return [Proc] An outer proc that can be used to iterate over the raw stream, converting it to JSON.
+ # @return [Proc] An outer proc that iterates over a raw stream, converting it to JSON.
53
def to_json_stream(user_proc:)
54
proc do |chunk, _|
55
chunk.scan(/(?:data|error): (\{.*\})/i).flatten.each do |data|
0 commit comments