Assistants Messages has problem with TypeScript

It seems that OpenAI implementation is correct, I just needed to check the type before accessing .text.

if (message.content[0].type == 'text') {
              response = message.content[0].text.value
}

This removes the error.

1 Like