feat: harden public OpenAI API contracts
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
{
|
||||
"$id": "https://interactive-media.local/schemas/realtime-server-events-v1.json",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"additionalProperties": true,
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"type": {
|
||||
"enum": [
|
||||
"x.interactive_media.capabilities.updated",
|
||||
"x.interactive_media.session.variables.updated",
|
||||
"x.interactive_media.workflow.node_active",
|
||||
"x.interactive_media.workflow.event",
|
||||
"x.interactive_media.workflow.variables.updated",
|
||||
"x.interactive_media.workflow.error",
|
||||
"x.interactive_media.call.handoff_requested",
|
||||
"x.interactive_media.call.ended"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"version": {
|
||||
"const": "1",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"version"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"event_id": {
|
||||
"title": "Event Id",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"session.created",
|
||||
"session.updated",
|
||||
"conversation.item.added",
|
||||
"conversation.item.done",
|
||||
"conversation.item.truncated",
|
||||
"conversation.item.input_audio_transcription.completed",
|
||||
"input_audio_buffer.committed",
|
||||
"input_audio_buffer.cleared",
|
||||
"input_audio_buffer.speech_started",
|
||||
"input_audio_buffer.speech_stopped",
|
||||
"output_audio_buffer.cleared",
|
||||
"response.created",
|
||||
"response.output_item.added",
|
||||
"response.output_item.done",
|
||||
"response.content_part.added",
|
||||
"response.content_part.done",
|
||||
"response.output_text.delta",
|
||||
"response.output_text.done",
|
||||
"response.output_audio.delta",
|
||||
"response.output_audio.done",
|
||||
"response.output_audio_transcript.delta",
|
||||
"response.output_audio_transcript.done",
|
||||
"response.function_call_arguments.delta",
|
||||
"response.function_call_arguments.done",
|
||||
"response.done",
|
||||
"error",
|
||||
"x.interactive_media.capabilities.updated",
|
||||
"x.interactive_media.session.variables.updated",
|
||||
"x.interactive_media.workflow.node_active",
|
||||
"x.interactive_media.workflow.event",
|
||||
"x.interactive_media.workflow.variables.updated",
|
||||
"x.interactive_media.workflow.error",
|
||||
"x.interactive_media.call.handoff_requested",
|
||||
"x.interactive_media.call.ended"
|
||||
],
|
||||
"title": "Type",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"event_id"
|
||||
],
|
||||
"title": "Interactive Media OpenAI Realtime server events v1",
|
||||
"type": "object"
|
||||
}
|
||||
Reference in New Issue
Block a user