Moderation of chat, messages

I am working on a public app with chat mode, I am using the openai.createModeration nodejs lib to handle the moderation.

  1. As the moderation input accepts only a string. I merge message contents into one string and use it inside the moderation tool. It seems not to work well, so my question is, how properly use the moderation api for chat messages?

  2. Also, how to know if an API call ended up being flagged? I mean, sometimes I got messages back that say that this question is not appropriate, but I do not know if the message was indeed flagged.