Skip to content

Fix APIConnectionError when using AsyncOpenAI with FastAPI/uvicorn (u… #41

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LuminaX-alt
Copy link
Owner

…vloop) by adjusting client lifecycle

Fix APIConnectionError when using AsyncOpenAI with FastAPI and uvicorn (uvloop)

  • Updated AsyncOpenAI usage to support proper lifecycle under uvloop.
  • Added support for lazy client initialization and explicit transport configuration to prevent connection pool issues.
  • Improves stability for FastAPI + uvicorn users.

Fixes: openai#1927

  • I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested

Additional context & links

…vloop) by adjusting client lifecycle

Fix APIConnectionError when using AsyncOpenAI with FastAPI and uvicorn (uvloop)

- Updated AsyncOpenAI usage to support proper lifecycle under uvloop.
- Added support for lazy client initialization and explicit transport configuration to prevent connection pool issues.
- Improves stability for FastAPI + uvicorn users.

Fixes: openai#1927
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

Successfully merging this pull request may close these issues.

APIConnectionError raised when using AsyncOpenAI along FastAPI and uvicorn(uvloop)
1 participant