Skip to content

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)

2 participants