GPT-4 content_filter_error

I am trying to do function calling from a script, which worked fine yesterday but today returns an empty completion (see below). When I switch the model to 3.5-turbo, everything runs fine again. Why is this happening? The completion also says there are 1192 completion tokens, yet the contents are empty.

ChatCompletion(id=‘chatcmpl-8frbPcK0ETp32JV4’, choices=[Choice(finish_reason=‘stop’, index=0, logprobs=None, message=ChatCompletionMessage(content=None, role=‘assistant’, function_call=None, tool_calls=None), content_filter_result={‘error’: {‘code’: ‘content_filter_error’, ‘message’: ‘The contents are not filtered’}}, content_filter_results={})], created=1704988187, model=‘gpt-4’, object=‘chat.completion’, system_fingerprint=None, usage=CompletionUsage(completion_tokens=1192, prompt_tokens=1392, total_tokens=2584), prompt_filter_results=[{‘prompt_index’: 0, ‘content_filter_results’: {}}])

I ran into the same issue, when removing the tool call it worked but the JSON was not properly formatted in a robust way across all the queries.

Looks like some other folks had a similar issue.

Which model are you using? Could you try tweaking your prompt slightly? It may be erroneously

mindful that the error message seems to suggest there is no filtering

Ah thanks for the link. It is indeed the exact same issue I am having. I believe everyone is experiencing the problem on the 1106 models. Also seems to be part of the Azure OpenAI Service.

I’m experimenting the same error since 4 days. Function call works, but tool calls have been removed from Microsoft Azure OpenAI service.