UNPKG

@sap-ai-sdk/foundation-models

Version:

SAP Cloud SDK for AI is the official Software Development Kit (SDK) for **SAP AI Core**, **SAP Generative AI Hub**, and **Orchestration Service**.

31 lines 1.1 kB
import type { HttpResponse } from '@sap-cloud-sdk/http-client'; import type { AzureOpenAiEmbeddingOutput } from './azure-openai-embedding-types.js'; /** * Azure OpenAI embedding response. */ export declare class AzureOpenAiEmbeddingResponse { readonly rawResponse: HttpResponse; /** * The embedding response. */ readonly _data: AzureOpenAiEmbeddingOutput; constructor(rawResponse: HttpResponse); /** * Gets the request ID from the response headers. * @returns The request ID, or undefined if the header is not present. */ getRequestId(): string | undefined; /** * Parses the Azure OpenAI response and returns the embedding. * @param dataIndex - The index of the data to parse. * @returns The embedding vector. */ getEmbedding(dataIndex?: number): number[] | undefined; /** * Parses the Azure OpenAI response and returns all embeddings. * @returns The embedding vectors. */ getEmbeddings(): number[][]; private logInvalidDataIndex; } //# sourceMappingURL=azure-openai-embedding-response.d.ts.map