You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
2. Send a streaming message request that would trigger the content filtering to the model.
3. Inspect the expectation and see that the inner exception is null.
Expected behavior
The inner exception is expected to be populated with the information on why the message was blocked.
Screenshots
Platform
OS: Windows
IDE: Visual Studio
Language: C#
Source: NuGet package version 1.27.0
The text was updated successfully, but these errors were encountered:
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.
2. Send a streaming message request that would trigger the content filtering to the model.
3. Inspect the expectation and see that the inner exception is null.
Expected behavior
The inner exception is expected to be populated with the information on why the message was blocked.
Screenshots
Platform
The text was updated successfully, but these errors were encountered: