-
Notifications
You must be signed in to change notification settings - Fork 59.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] OpenAI Realtime API #5672
Labels
enhancement
New feature or request
Comments
Closed
|
请问这个有免费模型可用吗?还没聊1分钟就0.1$了。 |
Is there a free model available for this? It’s only 0.1$ after chatting for 1 minute. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🥰 需求描述
https://openai.com/index/introducing-the-realtime-api/
https://platform.openai.com/docs/api-reference/realtime
https://github.com/openai/openai-realtime-console/blob/main/readme/realtime-console-demo.png
🧐 解决方案
逻辑
sessions
,conversation
等概念,session支持配置modalities, instructions, voice, input_audio_format, output_audio_format, turn_detection, input_audio_transcription, tools等,支持function callinput_audio_buffer.append
以及input_audio_buffer.commit
方式上传音频,再通过response.create
开始生成结果(turn_detection如果开启,可以不用手动调用)conversation.item.create
将上下文的内容直接添加到当前的conversation,如果是历史记录,需要设置status=completedconversation.item.truncate
支持打断输入response.audio.delta
拿到base64 audio data,通过response.text.delta
同步拿到文本。response.output_item.added
拿到是否是function call, 通过监听response.function_call_arguments.delta
拿到function call参数。或者直接在response.done
里面拿function call相关信息?交互
讨论
📝 补充信息
价格
The text was updated successfully, but these errors were encountered: