openAI API Error: prompt issue

openai.error.InvalidRequestError: Sorry! We’ve encountered an issue with repetitive patterns in your pro

I am just formatting the data that is scraped from the internet, and I am extracting some info.


This is what motivation OpenAI may have for inserting an error detection. Here where I try to trigger the same and get random output on a chat model:



Stopping this input by haphazard API technique that interrupts developer code is inappropriate. Are you able to share the input which can reproduce the API error?

1 Like

I am getting this error as well. I use Whisper to transcribe, and when the signal is low, Whisper produces very long repetitive text like:

“BBBBBBBBBBBBBBmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm USB-C USB-C USB-C” (… x 100)

If I ask “Please summarize the following conversation: [repetitive text]”. I get this error.

I agree with _j, we need to know what specific situation causes this error so we can clean the input. (An even better solution for me would be if Whisper could have a noise floor remover!)

1 Like

The topic was without documentation of the language model and example inputs. Repetition caused the uncommon error message, guarding against silly inputs.

To transition it completely to a new topic about Whisper:

  • Silence without words causes the repetition and hallucination in Whisper. The AI is also predisposed to pick up on the spoken language within the first few seconds.

You of course identified that.

Silence detection before you send can lower your per-second billing, besides making output of words reliable by sending input of actual words.

for anyone facing this, I recommend using langsmith and exploring, what exactly was sent to the API.

for my use-case I noticed, that some of the documents, submitted by the user, were having a big amount of empty whitespaces, which openai api didn’t want to treat well.

1 Like