@langchain/community
Version:
Third-party integrations for LangChain.js
1 lines • 2.44 kB
Source Map (JSON)
{"version":3,"file":"bytedance_doubao.d.ts","names":["Embeddings","EmbeddingsParams","ByteDanceDoubaoEmbeddingsParams","ByteDanceDoubaoEmbeddings","Partial","Promise"],"sources":["../../src/embeddings/bytedance_doubao.d.ts"],"sourcesContent":["import { Embeddings, type EmbeddingsParams } from \"@langchain/core/embeddings\";\nexport interface ByteDanceDoubaoEmbeddingsParams extends EmbeddingsParams {\n /** Model name to use */\n model: string;\n /**\n * Timeout to use when making requests to ByteDanceDoubao.\n */\n timeout?: number;\n /**\n * The maximum number of documents to embed in a single request. This is\n * limited by the ByteDanceDoubao API to a maximum of 2048.\n */\n batchSize?: number;\n /**\n * Whether to strip new lines from the input text.\n */\n stripNewLines?: boolean;\n}\nexport declare class ByteDanceDoubaoEmbeddings extends Embeddings implements ByteDanceDoubaoEmbeddingsParams {\n model: string;\n batchSize: number;\n stripNewLines: boolean;\n apiKey: string;\n constructor(fields?: Partial<ByteDanceDoubaoEmbeddingsParams> & {\n verbose?: boolean;\n apiKey?: string;\n });\n /**\n * Method to generate embeddings for an array of documents. Splits the\n * documents into batches and makes requests to the ByteDanceDoubao API to generate\n * embeddings.\n * @param texts Array of documents to generate embeddings for.\n * @returns Promise that resolves to a 2D array of embeddings for each document.\n */\n embedDocuments(texts: string[]): Promise<number[][]>;\n /**\n * Method to generate an embedding for a single document. Calls the\n * embeddingWithRetry method with the document as the input.\n * @param text Document to generate an embedding for.\n * @returns Promise that resolves to an embedding for the document.\n */\n embedQuery(text: string): Promise<number[]>;\n /**\n * Method to generate an embedding params.\n * @param texts Array of documents to generate embeddings for.\n * @returns an embedding params.\n */\n private getParams;\n private embeddingWithRetry;\n}\n//# sourceMappingURL=bytedance_doubao.d.ts.map"],"mappings":";;;UACiBE,+BAAAA,SAAwCD;;EAAxCC,KAAAA,EAAAA,MAAAA;EAiBIC;;;EAgBgBE,OAAAA,CAAAA,EAAAA,MAAAA;EAOPA;;;AAvB8E;;;;;;;cAAvFF,yBAAAA,SAAkCH,UAAAA,YAAsBE;;;;;uBAKpDE,QAAQF;;;;;;;;;;;mCAWIG;;;;;;;4BAOPA"}