APIBaseService class extends WatsonxBaseService and provides common API request functionalities.

Hierarchy (view full)

Constructors - Constructor

Properties

httpsAgentMap: WatsonXAI.HttpsAgentMap = ...
serviceUrl: string

URL required for watsonx inference endpoints

version: string

The version date for the API of the form YYYY-MM-DD.

wxServiceUrl: string

URL required for dataplatform endpoints

PLATFORM_URLS_MAP: Record<string, string> = PLATFORM_URL_MAPPINGS

Methods

  • Performs a POST request to the specified URL and returns a stream.

    Type Parameters

    • T

    Parameters

    Returns Promise<Stream<string | T>>

    • A promise that resolves to a stream from the POST request.