Describe the bug
Faraday middleware attempts to parse HTML responses as JSON. This occurs when Cloudflare (in front of the API) returns HTML, leading to a Faraday::ParsingError
To Reproduce
Steps to reproduce the behavior:
Stems from Cloudfare's upstream connection issues to OpenAI. Not sure how to reproduce.
Expected behavior
No Faraday::ParsingError
Additional context
Relevant line:
This gem allows Faraday v1 and v2. For v1 parsing requires Faraday Middleware. When using this one must specify the content type when including the middleware.
When no content type is set the v1 middleware will try to parse everything. Faraday v2 does not have this problem.
Describe the bug
Faraday middleware attempts to parse HTML responses as JSON. This occurs when Cloudflare (in front of the API) returns HTML, leading to a
Faraday::ParsingErrorTo Reproduce
Steps to reproduce the behavior:
Stems from Cloudfare's upstream connection issues to OpenAI. Not sure how to reproduce.
Expected behavior
No
Faraday::ParsingErrorAdditional context
Relevant line:
ruby-openai/lib/openai/http.rb
Line 64 in 6c834c2
This gem allows Faraday v1 and v2. For v1 parsing requires Faraday Middleware. When using this one must specify the content type when including the middleware.
When no content type is set the v1 middleware will try to parse everything. Faraday v2 does not have this problem.