Reuse HTTP Connections for OpenAI-Compatible APIs in Python
A one-off API script can create a client, send one request, and exit. A long-running worker should not rebuild its HTTP connection state for every prompt.
Repeated client creation can repeat DNS looku
vectronode.hashnode.dev6 min read