logitBias method

OpenAIBuilder logitBias(
  1. Map<String, double> bias
)

Sets logit bias for specific tokens

Modify the likelihood of specified tokens appearing in the completion. Maps tokens (specified by their token ID) to an associated bias value from -100 to 100.

  • -100: Token is banned
  • 0: No bias (default)
  • 100: Token is strongly encouraged

Implementation

OpenAIBuilder logitBias(Map<String, double> bias) {
  _baseBuilder.extension('logitBias', bias);
  return this;
}