Interface for the input parameters specific to the Aleph Alpha LLM.

interface AlephAlphaInput {
    aleph_alpha_api_key?: string;
    base_url: string;
    best_of?: number;
    cache?: boolean | BaseCache<Generation[]>;
    callbackManager?: CallbackManager;
    callbacks?: Callbacks;
    completion_bias_exclusion?: string[];
    completion_bias_exclusion_first_token_only: boolean;
    completion_bias_inclusion?: string[];
    completion_bias_inclusion_first_token_only: boolean;
    concurrency?: number;
    contextual_control_threshold?: number;
    control_log_additive: boolean;
    disable_optimizations?: boolean;
    echo?: boolean;
    frequency_penalty?: number;
    log_probs?: number;
    logit_bias?: object;
    maxConcurrency?: number;
    maxRetries?: number;
    maximum_tokens: number;
    metadata?: Record<string, unknown>;
    minimum_tokens?: number;
    model: string;
    n?: number;
    onFailedAttempt?: FailedAttemptHandler;
    penalty_bias?: string;
    penalty_exceptions?: string[];
    penalty_exceptions_include_stop_sequences?: boolean;
    presence_penalty?: number;
    raw_completion: boolean;
    repetition_penalties_include_completion?: boolean;
    repetition_penalties_include_prompt?: boolean;
    sequence_penalty?: number;
    sequence_penalty_min_length?: number;
    stop?: string[];
    tags?: string[];
    temperature?: number;
    tokens?: boolean;
    top_k?: number;
    top_p?: number;
    use_multiplicative_frequency_penalty?: boolean;
    use_multiplicative_presence_penalty?: boolean;
    use_multiplicative_sequence_penalty?: boolean;
    verbose?: boolean;
}

Hierarchy

  • BaseLLMParams
    • AlephAlphaInput

Implemented by

Properties

aleph_alpha_api_key?: string
base_url: string
best_of?: number
cache?: boolean | BaseCache<Generation[]>
callbackManager?: CallbackManager

Use callbacks instead

callbacks?: Callbacks
completion_bias_exclusion?: string[]
completion_bias_exclusion_first_token_only: boolean
completion_bias_inclusion?: string[]
completion_bias_inclusion_first_token_only: boolean
concurrency?: number

Use maxConcurrency instead

contextual_control_threshold?: number
control_log_additive: boolean
disable_optimizations?: boolean
echo?: boolean
frequency_penalty?: number
log_probs?: number
logit_bias?: object
maxConcurrency?: number

The maximum number of concurrent calls that can be made. Defaults to Infinity, which means no limit.

maxRetries?: number

The maximum number of retries that can be made for a single call, with an exponential backoff between each attempt. Defaults to 6.

maximum_tokens: number
metadata?: Record<string, unknown>
minimum_tokens?: number
model: string
n?: number
onFailedAttempt?: FailedAttemptHandler

Custom handler to handle failed attempts. Takes the originally thrown error object as input, and should itself throw an error if the input error is not retryable.

penalty_bias?: string
penalty_exceptions?: string[]
penalty_exceptions_include_stop_sequences?: boolean
presence_penalty?: number
raw_completion: boolean
repetition_penalties_include_completion?: boolean
repetition_penalties_include_prompt?: boolean
sequence_penalty?: number
sequence_penalty_min_length?: number
stop?: string[]
tags?: string[]
temperature?: number
tokens?: boolean
top_k?: number
top_p?: number
use_multiplicative_frequency_penalty?: boolean
use_multiplicative_presence_penalty?: boolean
use_multiplicative_sequence_penalty?: boolean
verbose?: boolean