[BUG] Azure OpenAI - Filtering bad request #48145
Labels
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
OpenAI
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Service Attention
Workflow: This issue is responsible by Azure service team.
Library name and version
Azure.AI.OpenAI Version=2.1.0-beta.1
Describe the bug
I do not have an easy way to see what the content filtering type was that filtered my message from OpenAI. At this link https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/content-filter?tabs=warning%2Cuser-prompt%2Cpython-new they show
When I hit a content filtering response I get this as the message
but all other properties are not exposed. I see that in the response I get back there is
InnerExpection
but it is null everytime, and I believe this is a bug. When I dig deeper in the debug console into non-public members, I see that innerError exists, but because it's non-public I have to use reflect to access it to log out the content filter.Expected behavior
That more properties from the actual error message would make it into exposed properties, particularly, that innererror would be exposed as
innerExpection
Actual behavior
innerExpection
is null everytime and the innererror is left out as a non-public member. This is basically all the useful information thta I'm getting out from the exceptionReproduction Steps
Create a generic try catch exception where the try makes a call using the
CompleteChatAsync
method and an input that would get flagged from the content filters. Try to log out innererror in the catch section somehow not using reflection and realize you can not.Environment
No response
The text was updated successfully, but these errors were encountered: