Commit Graph

2 Commits

Author SHA1 Message Date
8c18d54314 feat: add streaming response support to openai agent example
Updated the OpenAI agent example to demonstrate streaming responses by modifying the chat completion call to include `stream=True` and iterating over response chunks. Added a new `stream_response` function that yields tokens incrementally, showcasing real-time output for interactive use cases. The example now includes a `main` block that calls this function with a sample prompt, improving clarity for developers integrating streaming into their agents.
2024-12-20 19:00:20 +00:00
291e839680 feat: add openai_agent_example.py demonstrating agent integration with OpenAI API
This commit introduces a new example script that showcases how to build and run an AI agent using the OpenAI API, including setup instructions and basic interaction patterns.
2024-12-20 17:49:17 +00:00