constructor(top_p, {
        filter_value = -Infinity,
        min_tokens_to_keep = 1,
    } = {}) {
        super();
        if (top_p < 0 || top_p > 1.0) {
            throw new Error(`\`top_p\` must be a float > 0 and < 1, but is ${top_p}`)
        }
        if (!Number.isInteger(min_tokens_to_keep) || min_tokens_to_keep < 1) {
            throw new Error(`\`min_tokens_to_keep\` must be a positive integer, but is ${min_tokens_to_keep}`)
        }

        this.top_p = top_p
        this.filter_value = filter_value
        this.min_tokens_to_keep = min_tokens_to_keep
    }
Create a `TopPLogitsWarper`.
@param {number} top_p If set to < 1, only the smallest set of most probable tokens with
probabilities that add up to `top_p` or higher are kept for generation.
@param {Object} options Additional options for the top-p sampling.
@param {number} [options.filter_value=-Infinity] All filtered values will be set to this float value.
@param {number} [options.min_tokens_to_keep=1] Minimum number of tokens that cannot be filtered.