Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lack of handling for Azure OpenAI content filter block #61

Open
maisadalbone opened this issue Jan 14, 2025 · 0 comments
Open

Lack of handling for Azure OpenAI content filter block #61

maisadalbone opened this issue Jan 14, 2025 · 0 comments

Comments

@maisadalbone
Copy link

When executing the run_fuzzer(app_config) method, the application throws a BadRequestError exception when the Azure OpenAI content filter blocks the message. This results in a code execution failure without proper handling for this situation.

BadRequestError                           Traceback (most recent call last)
<ipython-input-21-7fbcd7406e15> in <cell line: 2>()
      1 app_config = AppConfig(None,config_state=config)
----> 2 run_fuzzer(app_config)

20 frames
/usr/local/lib/python3.10/dist-packages/openai/_base_client.py in _request(self, cast_to, options, retries_taken, stream, stream_cls)
   1059 
   1060             log.debug("Re-raising status error")
-> 1061             raise self._make_status_error_from_response(err.response) from None
   1062 
   1063         return self._process_response(

BadRequestError: Error code: 400 - {'error': {'message': "The response was filtered due to the prompt triggering Azure OpenAI's content management policy. 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant