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

    Class OrchestrationClient

    Client for the SAP AI Core Orchestration Service.

    The configuration (model, parameters, tools, etc.) is fixed at construction time. To use different model parameters or tools for a specific request, create a new OrchestrationClient instance with the desired configuration.

    Index
    • Send a chat completion request to the orchestration service.

      Parameters

      • Optionalrequest: ChatCompletionRequest

        Request containing messages, placeholder values, and message history.

      • OptionalrequestConfig: Pick<
            HttpRequestConfig,
            | "middleware"
            | "maxContentLength"
            | "proxy"
            | "httpAgent"
            | "httpsAgent"
            | "parameterEncoder"
            | "signal",
        > & Record<string, any> & { headers?: OrchestrationRequestHeaders }

        Additional request configuration. Use requestConfig.headers to pass service-specific headers:

        • AI-Object-Store-Secret-Name: Name of the object store secret used by the feedback service.

      Returns Promise<OrchestrationResponse>

      The orchestration service response.

    • Create a streaming chat completion request to the orchestration service.

      Parameters

      • Optionalrequest: ChatCompletionRequest

        Request containing messages, placeholder values, and message history.

      • Optionalsignal: AbortSignal

        An abort signal to cancel the request.

      • Optionaloptions: StreamOptions

        Streaming options, e.g., for input/output filtering.

      • OptionalrequestConfig: Pick<
            HttpRequestConfig,
            | "middleware"
            | "maxContentLength"
            | "proxy"
            | "httpAgent"
            | "httpsAgent"
            | "parameterEncoder"
            | "signal",
        > & Record<string, any> & { headers?: OrchestrationRequestHeaders }

        Additional request configuration. Use requestConfig.headers to pass service-specific headers:

        • AI-Object-Store-Secret-Name: Name of the object store secret used by the feedback service.

      Returns Promise<OrchestrationStreamResponse<OrchestrationStreamChunkResponse>>

      The orchestration stream response.