Member Junction
    Preparing search index...

    Type Alias EmbedTextParams

    EmbedTextParams: BaseParams & {
        CancellationToken?: AbortSignal;
        dimensions?: number;
        inputType?: EmbeddingInputType;
        maxInputTokens?: number;
        text: string;
    }

    Type Declaration

    • OptionalCancellationToken?: AbortSignal

      Optional signal for cancelling the request. Drivers whose SDK can abort a request forward it, so an abort tears the request down; drivers that call an in-process model check it between items and stop. A request that stops because the signal fired throws a cancellation error (classified Cancelled, or a retriable NetworkError when the signal was aborted by a timeout) rather than returning an empty result, and is never retried.

    • Optionaldimensions?: number

      Optional output dimension override. Only supported by models that accept a dimensions parameter (e.g. OpenAI text-embedding-3-*). When omitted, the model's native default dimension is used. The value stored in MJ: Vector Indexes.Dimensions is the authoritative source — callers should read it from there and pass it here.

    • OptionalinputType?: EmbeddingInputType

      Optional retrieval role of the text. Drivers with a native parameter (Cohere's input_type) map it; other drivers ignore it. Instruction prefixes for prefix-trained models come from the model's ModelConfiguration.Embedding section and are applied by the caller with ApplyEmbeddingInputPrefix, not by the driver.

    • OptionalmaxInputTokens?: number

      Optional cap on the input length, in tokens. Drivers that tokenize locally (e.g. LocalEmbedding) truncate each text to it; hosted drivers ignore it. Callers pass the catalog limit, MJ: AI Model Vendors.MaxInputTokens. When omitted, the tokenizer's own limit applies, and some tokenizers declare none.

    • text: string