module OpenAI::HTTP
def parse_jsonl(response)
def parse_jsonl(response) return unless response return response unless response.is_a?(String) # Convert a multiline string of JSON objects to a JSON array. response = response.gsub("}\n{", "},{").prepend("[").concat("]") JSON.parse(response) end