interface OllamaInput {
    baseUrl?: string;
    cache?: boolean | BaseCache<Generation[]>;
    callbackManager?: CallbackManager;
    callbacks?: Callbacks;
    concurrency?: number;
    embeddingOnly?: boolean;
    f16Kv?: boolean;
    format?: string;
    frequencyPenalty?: number;
    headers?: Headers;
    keepAlive?: string | number;
    logitsAll?: boolean;
    lowVram?: boolean;
    mainGpu?: number;
    maxConcurrency?: number;
    maxRetries?: number;
    metadata?: Record<string, unknown>;
    mirostat?: number;
    mirostatEta?: number;
    mirostatTau?: number;
    model?: string;
    numBatch?: number;
    numCtx?: number;
    numGpu?: number;
    numKeep?: number;
    numPredict?: number;
    numThread?: number;
    numa?: boolean;
    onFailedAttempt?: FailedAttemptHandler;
    penalizeNewline?: boolean;
    presencePenalty?: number;
    repeatLastN?: number;
    repeatPenalty?: number;
    seed?: number;
    stop?: string[];
    tags?: string[];
    temperature?: number;
    tfsZ?: number;
    topK?: number;
    topP?: number;
    typicalP?: number;
    useMlock?: boolean;
    useMmap?: boolean;
    verbose?: boolean;
    vocabOnly?: boolean;
}

Hierarchy (view full)

Implemented by

Properties

baseUrl?: string

Optionally override the base URL to make request to. This should only be set if your Ollama instance is being server from a non-standard location.

"http://localhost:11434"
cache?: boolean | BaseCache<Generation[]>
callbackManager?: CallbackManager

Use callbacks instead

callbacks?: Callbacks
concurrency?: number

Use maxConcurrency instead

embeddingOnly?: boolean
f16Kv?: boolean
format?: string
frequencyPenalty?: number
headers?: Headers

Optional HTTP Headers to include in the request.

keepAlive?: string | number
"5m"
logitsAll?: boolean
lowVram?: boolean
mainGpu?: number
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.

metadata?: Record<string, unknown>
mirostat?: number
mirostatEta?: number
mirostatTau?: number
model?: string

The model to use when making requests.

"llama3"
numBatch?: number
numCtx?: number
numGpu?: number
numKeep?: number
numPredict?: number
numThread?: number
numa?: boolean
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.

penalizeNewline?: boolean
presencePenalty?: number
repeatLastN?: number
repeatPenalty?: number
seed?: number
stop?: string[]
tags?: string[]
temperature?: number
tfsZ?: number
topK?: number
topP?: number
typicalP?: number
useMlock?: boolean
useMmap?: boolean
verbose?: boolean
vocabOnly?: boolean