Added a new `stream_response` function that yields tokens incrementally by setting `stream=True` on the chat completion call and iterating over response chunks. The example now includes a `main` block that calls this function with a sample prompt, demonstrating real-time output for interactive use cases. Also fixed grammar and punctuation in docstrings, corrected the pip install package name from `openapi` to `openai`, and improved clarity of setup instructions.
Introduce a new 219-line example script that implements an Agent class for building AI agents using the OpenAI API. The script includes setup instructions, fake API credentials for educational purposes, async support via asyncio, and a full chat history tracking mechanism through the messages property.