Module validate

Module validate 

Source

Constants§

BEST_OF_RANGE
Allowed range of values for best_of
FREQUENCY_PENALTY_RANGE
Allowed range of values for OpenAI’s frequency_penalty sampling option
LENGTH_PENALTY_RANGE
Allowed range of values for length_penalty
MAX_BEST_OF
Maximum allowed value for best_of
MAX_FREQUENCY_PENALTY
Maximum allowed value for OpenAI’s frequency_penalty sampling option
MAX_FUNCTION_NAME_LENGTH
Maximum allowed length for function names
MAX_LENGTH_PENALTY
Maximum allowed value for length_penalty
MAX_LOGIT_BIAS
Maximum allowed value for OpenAI’s logit_bias values
MAX_LOGPROBS
Maximum allowed value for logprobs in completion requests
MAX_METADATA_KEY_LENGTH
Maximum allowed length for metadata keys
MAX_METADATA_PAIRS
Maximum allowed number of metadata key-value pairs
MAX_METADATA_VALUE_LENGTH
Maximum allowed length for metadata values
MAX_MIN_P
Maximum allowed value for min_p
MAX_N
Maximum allowed value for n (number of choices)
MAX_PRESENCE_PENALTY
Maximum allowed value for OpenAI’s presence_penalty sampling option
MAX_PROMPT_TOKEN_ID
Maximum allowed value for Prompt IntegerArray elements
MAX_REPETITION_PENALTY
Maximum allowed value for repetition_penalty
MAX_STOP_SEQUENCES
Maximum allowed number of stop sequences
MAX_TEMPERATURE
Maximum allowed value for OpenAI’s temperature sampling option
MAX_TOOLS
Maximum allowed number of tools
MAX_TOP_LOGPROBS
Maximum allowed value for top_logprobs
MAX_TOP_P
Maximum allowed value for OpenAI’s top_p sampling option
MIN_BEST_OF
Minimum allowed value for best_of
MIN_FREQUENCY_PENALTY
Minimum allowed value for OpenAI’s frequency_penalty sampling option
MIN_LENGTH_PENALTY
Minimum allowed value for length_penalty
MIN_LOGIT_BIAS
Minimum allowed value for OpenAI’s logit_bias values
MIN_LOGPROBS
Minimum allowed value for logprobs in completion requests
MIN_MIN_P
Minimum allowed value for min_p
MIN_N
Minimum allowed value for n (number of choices)
MIN_PRESENCE_PENALTY
Minimum allowed value for OpenAI’s presence_penalty sampling option
MIN_P_RANGE
Allowed range of values for min_p
MIN_REPETITION_PENALTY
Minimum allowed value for repetition_penalty
MIN_TEMPERATURE
Minimum allowed value for OpenAI’s temperature sampling option
MIN_TOP_LOGPROBS
Maximum allowed value for top_logprobs
MIN_TOP_P
Minimum allowed value for OpenAI’s top_p sampling option
N_RANGE
Allowed range of values for n (number of choices)
PRESENCE_PENALTY_RANGE
Allowed range of values for OpenAI’s presence_penalty sampling option
TEMPERATURE_RANGE
Allowed range of values for OpenAI’s `temperature`` sampling option
TOP_P_RANGE
Allowed range of values for OpenAI’s top_p sampling option

Functions§

validate_best_of
Validates best_of parameter
validate_frequency_penalty
Validates frequency penalty parameter
validate_logit_bias
Validates logit bias map
validate_logprobs
Validates logprobs parameter (for completion requests)
validate_max_completion_tokens
Validates max_completion_tokens parameter
validate_max_tokens
Validates max_tokens parameter
validate_messages
Validates messages array
validate_metadata
Validates metadata
validate_model
Validates model parameter
validate_n
Validates n parameter (number of choices)
validate_presence_penalty
Validates presence penalty parameter
validate_prompt
Validates prompt
validate_range
validate_reasoning_effort
Validates reasoning effort parameter
validate_repetition_penalty
validate_service_tier
Validates service tier parameter
validate_stop
Validates stop sequences
validate_suffix
Validates suffix parameter
validate_temperature
Validates the temperature parameter
validate_temperature_top_p_exclusion
Validates mutual exclusion of temperature and top_p
validate_tools
Validates tools array
validate_top_logprobs
Validates top_logprobs parameter
validate_top_p
Validates the top_p parameter
validate_user
Validates user parameter