interface JinaEmbeddingsParams {
    baseUrl?: string;
    batchSize?: number;
    dimensions?: number;
    maxConcurrency?: number;
    maxRetries?: number;
    model: string;
    normalized?: boolean;
    onFailedAttempt?: FailedAttemptHandler;
    stripNewLines?: boolean;
    timeout?: number;
}

Hierarchy

  • EmbeddingsParams
    • JinaEmbeddingsParams

Implemented by

Properties

baseUrl?: string
batchSize?: number

The maximum number of documents to embed in a single request.

dimensions?: number

The dimensions of the embedding.

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.

model: string

Model name to use

normalized?: boolean

Scales the embedding so its Euclidean (L2) norm becomes 1, preserving direction. Useful when downstream involves dot-product, classification, visualization..

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.

stripNewLines?: boolean

Whether to strip new lines from the input text.

timeout?: number

Timeout to use when making requests to Jina.