async def get_final_response(self) -> ParsedResponse[TextFormatT]:
        """Waits until the stream has been read to completion and returns
        the accumulated `ParsedResponse` object.
        """
        await self.until_done()
        response = self._state._completed_response
        if not response:
            raise RuntimeError("Didn't receive a `response.completed` event.")

        return response
Waits until the stream has been read to completion and returns
        the accumulated `ParsedResponse` object.
        
src/openai/lib/streaming/responses/_responses.py