UNPKG

@sap-ai-sdk/langchain

Version:

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

28 lines 1.14 kB
import { Embeddings } from '@langchain/core/embeddings'; import type { HttpDestinationOrFetchOptions } from '@sap-cloud-sdk/connectivity'; import type { AzureOpenAiEmbeddingModel } from '@sap-ai-sdk/foundation-models'; import type { AzureOpenAiEmbeddingModelParams } from './types.js'; /** * LangChain embedding client for Azure OpenAI consumption on SAP BTP. */ export declare class AzureOpenAiEmbeddingClient extends Embeddings { modelName: AzureOpenAiEmbeddingModel; modelVersion?: string; resourceGroup?: string; private openAiEmbeddingClient; constructor(fields: AzureOpenAiEmbeddingModelParams, destination?: HttpDestinationOrFetchOptions); /** * Embed a list of document chunks. All chunks are embedded in one batch. * @param documents - Document chunks to embed. * @returns Embeddings. */ embedDocuments(documents: string[]): Promise<number[][]>; /** * Embed a single string. * @param input - Input string to embed. * @returns Embedding. */ embedQuery(input: string): Promise<number[]>; private createEmbeddings; } //# sourceMappingURL=embedding.d.ts.map