基于Python的简单OpenAI实时API应用示例
零延迟对话,可以随时打断。
后续会添加更多功能,如function call等。
在项目目录下创建.env
文件,写入你的OpenAI apikey:
OPENAI_API_KEY=sk-xxx
pip install -r requirements.txt
python main.py
A simple Python-based example for OpenAI Realtime API application.
Zero-latency conversation, can be interrupted at any time.
More features will be added later, such as function calls.
Create a .env
file in the project directory and add your OpenAI API key:
OPENAI_API_KEY=sk-xxx
pip install -r requirements.txt
python main.py