SAP AI SDK for JavaScript - v2.8.0
    Preparing search index...

    Interface EmbeddingRequest

    Embedding request configuration.

    interface EmbeddingRequest {
        input: string | string[];
        type?: "text" | "document" | "query";
    }
    Index

    Properties

    Properties

    input: string | string[]

    Text input for which embeddings need to be generated. Can be a single string or array of strings.

    input: "This is a text to embed" or
    input: ["Text 1", "Text 2", "Text 3"]
    type?: "text" | "document" | "query"

    Represents the task for which the embeddings need to be generated.

    'text'
    

    Copyright Ⓒ 2026 SAP SE or an SAP affiliate company. All rights reserved.