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 3dab92d commit 8e1d6a2Copy full SHA for 8e1d6a2
lib/openai/http.rb
@@ -7,9 +7,10 @@ module HTTP
7
include HTTPHeaders
8
9
def get(path:, parameters: nil)
10
- parse_jsonl(conn.get(uri(path: path), parameters) do |req|
11
- req.headers = headers
12
- end&.body)
+ response = conn.get(uri(path: path), parameters) { |req| req.headers = headers }
+ parse_jsonl(response.body)
+ rescue JSON::ParserError
13
+ response.body
14
end
15
16
def post(path:)
0 commit comments