VoiceAgentLiveEvent type
從 GPT Live 收到的事件,包括未被認可的服務事件。
type VoiceAgentLiveEvent =
| {
[K in LiveServerEventType]: K extends "decision.item.created"
? Omit<Extract<LiveServerEventUnion, { type: K }>, "item"> & {
item: VoiceAgentLiveDecisionStoredItem
}
: Extract<LiveServerEventUnion, { type: K }>
}[LiveServerEventType]
| VoiceAgentUnknownEvent