interface TogetherAICallOptions {
    callbacks?: Callbacks;
    configurable?: Record<string, any>;
    logprobs?: number;
    maxConcurrency?: number;
    maxTokens?: number;
    metadata?: Record<string, unknown>;
    model?: string;
    modelName?: string;
    recursionLimit?: number;
    repetitionPenalty?: number;
    runId?: string;
    runName?: string;
    safetyModel?: string;
    signal?: AbortSignal;
    stop?: string[];
    tags?: string[];
    temperature?: number;
    timeout?: number;
    topK?: number;
    topP?: number;
}

Hierarchy

  • BaseLLMCallOptions
  • Pick<TogetherAIInputs,
        | "modelName"
        | "model"
        | "temperature"
        | "topP"
        | "topK"
        | "repetitionPenalty"
        | "logprobs"
        | "safetyModel"
        | "maxTokens"
        | "stop">
    • TogetherAICallOptions

Properties

callbacks?: Callbacks

Callbacks for this call and any sub-calls (eg. a Chain calling an LLM). Tags are passed to all callbacks, metadata is passed to handle*Start callbacks.

configurable?: Record<string, any>

Runtime values for attributes previously made configurable on this Runnable, or sub-Runnables.

logprobs?: number

An integer that specifies how many top token log probabilities are included in the response for each token generation step.

maxConcurrency?: number

Maximum number of parallel calls to make.

maxTokens?: number

Limit the number of tokens generated.

metadata?: Record<string, unknown>

Metadata for this call and any sub-calls (eg. a Chain calling an LLM). Keys should be strings, values should be JSON-serializable.

model?: string

The name of the model to query.

modelName?: string

The name of the model to query. Alias for model

recursionLimit?: number

Maximum number of times a call can recurse. If not provided, defaults to 25.

repetitionPenalty?: number

A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition.

{1}
runId?: string

Unique identifier for the tracer run for this call. If not provided, a new UUID will be generated.

runName?: string

Name for the tracer run for this call. Defaults to the name of the class.

safetyModel?: string

Run an LLM-based input-output safeguard model on top of any model.

signal?: AbortSignal

Abort signal for this call. If provided, the call will be aborted when the signal is aborted.

stop?: string[]

Stop tokens to use for this call. If not provided, the default stop tokens for the model will be used.

tags?: string[]

Tags for this call and any sub-calls (eg. a Chain calling an LLM). You can use these to filter calls.

temperature?: number

A decimal number that determines the degree of randomness in the response. A value of 1 will always yield the same output. A temperature less than 1 favors more correctness and is appropriate for question answering or summarization. A value greater than 1 introduces more randomness in the output.

{0.7}
timeout?: number

Timeout for this call in milliseconds.

topK?: number

The topK parameter is used to limit the number of choices for the next predicted word or token. It specifies the maximum number of tokens to consider at each step, based on their probability of occurrence. This technique helps to speed up the generation process and can improve the quality of the generated text by focusing on the most likely options.

{50}
topP?: number

The topP (nucleus) parameter is used to dynamically adjust the number of choices for each predicted token based on the cumulative probabilities. It specifies a probability threshold, below which all less likely tokens are filtered out. This technique helps to maintain diversity and generate more fluent and natural-sounding text.

{0.7}