Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using async-http-faraday adapter doesn't work #548

Open
mackross opened this issue Nov 22, 2024 · 3 comments
Open

Using async-http-faraday adapter doesn't work #548

mackross opened this issue Nov 22, 2024 · 3 comments

Comments

@mackross
Copy link

Describe the bug
Unable to use ruby-openai with the 'async' fiber scheduler, the faraday adapter throws an error.

To Reproduce
Add async-http-faraday gem to Gemfile
include require 'async/http/faraday' somewhere.

Use client = OpenAI::Client.new do{ |f| f.adapter = :async_http } for a streaming completion.

raises error Faraday::NilStatusError: http status could not be derived from the server response

Expected behavior
Works as normal

@atesgoral
Copy link
Contributor

Just ran into this same issue. I might poke at it.

@atesgoral
Copy link
Contributor

Tried creating a breaking test first by hijacking an existing test, but the problem I ran into is I couldn't get VCR + WebMock + Async:HTTP play well. The mocking isn't working yet: #550

@mackross
Copy link
Author

Thanks for taking a look!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants