I am in the process of making a Discord bot and I have the openai NPM package installed, however, whenever I call the createModeration from the OpenAI client it throws me an error:
And this is my code:
const checkMessage = async () => {
const response = await OpenAi.createModeration({
model: "text-moderation-001",
input: message.content
});
return response.data.results[0];
};
This is the error:
[17:23:58] ERROR DETECTED [LAUNCHER] Error: Request failed with status code 400