Confusing RealTime API: "Invalid value: 'input_text'. Value must be 'text'."

Thanks @dominickwirzba for your full explanation !
It means a lot to me :slight_smile:

Finally I found the root cause of this error and it’s absolutely insane!

when I put the role value as user, the content.type must be input_text, otherwise it must be text.

openAIWebsocketRef.current.send(
    JSON.stringify({
      type: 'conversation.item.create',
      item: {
        type: 'message',
        role: messageItem.sender === 'Me' ? 'user' : 'assistant',
        content: [
          {
            type: messageItem.sender === 'Me' ? 'input_text' : 'text',
            text: messageItem.message,
          },
        ],
      },
    }),
  );