Heroku AI SDK Provider - v0.4.3
    Preparing search index...

    Interface EmbeddingOptions

    Configuration options for embedding generation.

    These options allow fine-tuning of the embedding process for different use cases such as search, classification, or clustering.

    EmbeddingOptions

    const options: EmbeddingOptions = {
    inputType: "search_query",
    embeddingType: "float",
    truncate: "END"
    };
    interface EmbeddingOptions {
        inputType?:
            | "search_document"
            | "search_query"
            | "classification"
            | "clustering";
        embeddingType?: "float"
        | "int8";
        truncate?: "NONE" | "START" | "END";
    }
    Index

    Properties

    inputType?: "search_document" | "search_query" | "classification" | "clustering"

    Specifies the type of input text for optimized embedding generation.

    • search_document: For documents that will be searched against
    • search_query: For search queries
    • classification: For text classification tasks
    • clustering: For text clustering tasks
    embeddingType?: "float" | "int8"

    The format of the returned embedding vectors.

    • float: Standard floating-point embeddings (default)
    • int8: Quantized 8-bit integer embeddings (smaller size, slight quality trade-off)
    truncate?: "NONE" | "START" | "END"

    How to handle text that exceeds the model's maximum input length.

    • NONE: Return an error if text is too long
    • START: Truncate from the beginning
    • END: Truncate from the end (default)