How to stream non-chat completions (used by older models like text-davinci-003) (cont.)
A streaming completion request
With a streaming Completions API call, the text is sent back via a series of events. In Python, you can iterate over these events with a for loop.