Expand description
OpenAI baseline contract.
Sources: Chat Completions and Completions, read on 2026-10-21. These are documented bounds, not hosted-server probes. All bounds are inclusive.
Constants§
- MAX_
BEST_ OF - Upper bound for completion
best_of. - MAX_
FREQUENCY_ PENALTY - Upper bound for
frequency_penalty. - MAX_
LOGIT_ BIAS - Upper bound for one
logit_biasvalue. - MAX_
LOGPROBS - Upper bound for the integer completion
logprobs. - MAX_N
- Upper bound for
n. - MAX_
PRESENCE_ PENALTY - Upper bound for
presence_penalty. - MAX_
TEMPERATURE - Upper bound for
temperature. - MAX_
TOP_ LOGPROBS - Upper bound for chat
top_logprobs. - MAX_
TOP_ P - Upper bound for
top_p. - MIN_
BEST_ OF - Lower bound for completion
best_of. - MIN_
FREQUENCY_ PENALTY - Lower bound for
frequency_penalty. - MIN_
LOGIT_ BIAS - Lower bound for one
logit_biasvalue. - MIN_
LOGPROBS - Lower bound for the integer completion
logprobs. - MIN_N
- Lower bound for
n. - MIN_
PRESENCE_ PENALTY - Lower bound for
presence_penalty. - MIN_
TEMPERATURE - Lower bound for
temperature. - MIN_
TOP_ LOGPROBS - Lower bound for chat
top_logprobs. - MIN_
TOP_ P - Lower bound for
top_p.
Traits§
- OpenAI
Validation - Covered OpenAI request checks.
Functions§
- validate_
best_ of - Accepts
Noneor completionbest_ofin 0..=20. - validate_
completion_ logprobs - Accepts
Noneor the integer/v1/completionslogprobsin 0..=5. - validate_
frequency_ penalty - Accepts
Noneorfrequency_penaltyin [-2, 2]. - validate_
logit_ bias_ value - Accepts one parsed
logit_biasvalue in [-100, 100], without clamping. - validate_
n - Accepts
Noneornin 1..=128. - validate_
presence_ penalty - Accepts
Noneorpresence_penaltyin [-2, 2]. - validate_
temperature - Accepts
Noneortemperaturein [0, 2]. - validate_
top_ logprobs - Accepts
Noneor chattop_logprobsin 0..=20. - validate_
top_ p - Accepts
Noneortop_pin [0, 1].