Open rsaundersbdo opened 1 day ago
@SergeyMenshykh - can you take a look at this - from Office Hours this week. @rsaundersbdo - thanks for putting this in, we will take a look.
Just to add a bit more context
when we get a 400 back we also get this Response Body, for some reason this is not returned, wondering what might be occluding the information or this is lost in the Azure SDK...
{
"error": {
"message": "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",
"type": null,
"param": "prompt",
"code": "content_filter",
"status": 400,
"innererror": {
"code": "ResponsibleAIPolicyViolation",
"content_filter_result": {
"hate": {
"filtered": false,
"severity": "safe"
},
"jailbreak": {
"filtered": false,
"detected": false
},
"self_harm": {
"filtered": false,
"severity": "safe"
},
"sexual": {
"filtered": false,
"severity": "safe"
},
"violence": {
"filtered": true,
"severity": "medium"
}
}
}
}
}
Describe the bug When receiving a 400 content filter exception from sending a message to an Azure OpenAI model the inner exception that is supposed to include the reasoning for the exception is null.
To Reproduce Steps to reproduce the behavior: 1.Setup an Azure OpenAI model with content filter set to block on message inputs.
Expected behavior The inner exception is expected to be populated with the information on why the message was blocked.
Screenshots
Platform