创建聊天对话请求
授权
请求头
请求体
Positive values penalize new tokens based on whether they appear in the text so far, increasing the chance the model talks about new topics.
For mild repetition reduction, try roughly 0.1 to 1. For strong suppression, you can increase toward 2, but quality may drop. Negative values encourage repetition.
See also frequency_penalty for penalizing tokens by how often they appear.
Required range: -2 < x < 2
-2 <= x <= 2Positive values penalize new tokens based on their existing frequency in the text, reducing the chance of repeating the same line verbatim.
For mild repetition reduction, try roughly 0.1 to 1. For strong suppression, you can increase toward 2, but quality may drop. Negative values encourage repetition.
See also presence_penalty for a fixed penalty on tokens that appear at least once.
Required range: -2 < x < 2
-2 <= x <= 2Modifies the likelihood of specified tokens appearing in the completion. Accepts a JSON object mapping tokens to bias values between -100 and 100. Mathematically, the bias is added to the logits before sampling. Exact behavior varies by model. For example, "logit_bias":{"1024": 6} increases the likelihood of token ID 1024.
Tools the model may call. Currently only functions are supported. Provide a list of functions the model can generate JSON arguments for.
See the function calling guide for more.
Penalty on repeated tokens to discourage or encourage repetition. 1.0 means no penalty and free repetition. Values above 1.0 penalize repetition. Values between 0.0 and 1.0 reward repetition. A balanced value is often around 1.2. The penalty applies to generated output and, in decoder-only models, to the prompt.
Required range: 0 < x < 2

