Commit Graph

3 Commits

Author SHA1 Message Date
b26056e0fa chore: add streaming support and configurable model parameters to openai_agent_example.py
- Implemented async streaming response handling for real-time token output
- Added configurable temperature, max_tokens, and top_p parameters via environment variables
- Refactored agent initialization to support both streaming and non-streaming modes
2024-12-22 10:25:17 +00:00
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