diff --git a/src/openai/_streaming.py b/src/openai/_streaming.py index 61a742668a..1ed89b9e18 100644 --- a/src/openai/_streaming.py +++ b/src/openai/_streaming.py @@ -223,6 +223,10 @@ async def close(self) -> None: """ await self.response.aclose() + async def aclose(self) -> None: + """Alias for :meth:`close` following the PEP 525 async cleanup convention.""" + await self.close() + class ServerSentEvent: def __init__(