Does penalties depend on the messages?

Does penalties depend on the messages?
I am trying to make a summarizer. Here the presence_penalty and frequency_penalty can come in useful because we want the assistant to use more of the words from the inputted message(s). In short, we want to have a low, if not minus value, for the penalty parameters, for it to repeat what has already been said.
But it is unclear to me whether the text input is included in the chatCompletion.
The Documentation says it penalizes based on the existence “in the text so far”. It is unclear to me if this “text” refers to the genereted or the overall text.

Thanks for taking a look at this.

  • Samuel Oslo