I am encountering an issue with the LangChain's Self-Critique Chain (Constitutional AI) when using it with AzureOpenAI. While it works perfectly fine with OpenAI, I receive the following error message when using AzureOpenAI:
openai.error.InvalidRequestError: The response was filtered due to the prompt triggering Azure OpenAI’s content management policy. Please modify your prompt and retry. To learn more about our content filtering policies please read our documentation: https://go.microsoft.com/fwlink/?linkid=2198766
Interestingly, this error occurs regardless of the query I provide. Even a simple question about Canada's capital triggers Azure's content filtering. It's worth noting that this issue does not occur when using OpenAI, and it also doesn't occur when using AzureOpenAI without the Self-Critique Chain.
I have tested it with different prompts and principles, but the result is always the same when I use AzureOpenAI: content policy filtering!