Logo

azure-openai

#1310000

content_policy_violation_error

The response was filtered due to the prompt triggering content management policy. Please modify your prompt and retry. See our documentation for more information on content filtering policies.

This error has been identified and solved.

Reason

The error you're encountering, Invalid parameter: "response_format" of type "json_object" is not supported with this model, indicates that the specific model you are using with the OpenAI API does not support the response_format parameter set to json_object. This is because some models or endpoints in the OpenAI API have specific requirements or limitations on the parameters they accept, and response_format: json_object is not compatible with the model you are currently using.

Solution

To fix the 400 status error due to the response_format parameter not being supported with the current model, you can take the following steps:

  • Remove the response_format parameter: This will allow the API to default to the standard text format supported by all models.

  • Change the model: Switch to a model that supports the json_object response format, if such a model is available.

  • Ensure compatibility: Verify that the model you are using is compatible with the response_format you are specifying, and adjust accordingly.

By doing one of these, you should be able to resolve the error related to the unsupported response_format.

Original Error Message

Raw

The response was filtered due to the prompt triggering content management policy. Please modify your prompt and retry. See our documentation for more information on content filtering policies.

Original Error Message

Raw

The response was filtered due to the prompt triggering content management policy. Please modify your prompt and retry. See our documentation for more information on content filtering policies.

Suggested Links

https://community.openai.com/t/getting-400-response-with-already-working-code/509212 https://community.openai.com/t/how-do-i-use-the-new-json-mode/475890 https://github.com/openai/openai-python/issues/887 https://forum.bubble.io/t/open-ai-api-http-400-error-payload/268017 https://community.openai.com/t/response-format-and-fields-with-pydantic/917168

© 2024 Portkey, Inc. All rights reserved

HIPAA

COMPLIANT

GDPR

Transform Your AI app prototypes to be production-ready

Talk to us →