UNPKG

@langchain/community

Version:
1 lines • 5.27 kB
{"version":3,"file":"tigris.d.cts","names":["EmbeddingsInterface","VectorStore","Document","TigrisLibArgs","TigrisVectorStore","Promise","Record"],"sources":["../../src/vectorstores/tigris.d.ts"],"sourcesContent":["import type { EmbeddingsInterface } from \"@langchain/core/embeddings\";\nimport { VectorStore } from \"@langchain/core/vectorstores\";\nimport { Document } from \"@langchain/core/documents\";\n/**\n * Type definition for the arguments required to initialize a\n * TigrisVectorStore instance.\n */\nexport type TigrisLibArgs = {\n index: any;\n};\n/**\n * Class for managing and operating vector search applications with\n * Tigris, an open-source Serverless NoSQL Database and Search Platform.\n */\nexport declare class TigrisVectorStore extends VectorStore {\n index?: any;\n _vectorstoreType(): string;\n constructor(embeddings: EmbeddingsInterface, args: TigrisLibArgs);\n /**\n * Method to add an array of documents to the Tigris database.\n * @param documents An array of Document instances to be added to the Tigris database.\n * @param options Optional parameter that can either be an array of string IDs or an object with a property 'ids' that is an array of string IDs.\n * @returns A Promise that resolves when the documents have been added to the Tigris database.\n */\n addDocuments(documents: Document[], options?: {\n ids?: string[];\n } | string[]): Promise<void>;\n /**\n * Method to add vectors to the Tigris database.\n * @param vectors An array of vectors to be added to the Tigris database.\n * @param documents An array of Document instances corresponding to the vectors.\n * @param options Optional parameter that can either be an array of string IDs or an object with a property 'ids' that is an array of string IDs.\n * @returns A Promise that resolves when the vectors have been added to the Tigris database.\n */\n addVectors(vectors: number[][], documents: Document[], options?: {\n ids?: string[];\n } | string[]): Promise<void>;\n /**\n * Method to perform a similarity search in the Tigris database and return\n * the k most similar vectors along with their similarity scores.\n * @param query The query vector.\n * @param k The number of most similar vectors to return.\n * @param filter Optional filter object to apply during the search.\n * @returns A Promise that resolves to an array of tuples, each containing a Document and its similarity score.\n */\n similaritySearchVectorWithScore(query: number[], k: number, filter?: object): Promise<[Document<Record<string, any>>, number][]>;\n /**\n * Static method to create a new instance of TigrisVectorStore from an\n * array of texts.\n * @param texts An array of texts to be converted into Document instances and added to the Tigris database.\n * @param metadatas Either an array of metadata objects or a single metadata object to be associated with the texts.\n * @param embeddings An instance of Embeddings to be used for embedding the texts.\n * @param dbConfig An instance of TigrisLibArgs to be used for configuring the Tigris database.\n * @returns A Promise that resolves to a new instance of TigrisVectorStore.\n */\n static fromTexts(texts: string[], metadatas: object[] | object, embeddings: EmbeddingsInterface, dbConfig: TigrisLibArgs): Promise<TigrisVectorStore>;\n /**\n * Static method to create a new instance of TigrisVectorStore from an\n * array of Document instances.\n * @param docs An array of Document instances to be added to the Tigris database.\n * @param embeddings An instance of Embeddings to be used for embedding the documents.\n * @param dbConfig An instance of TigrisLibArgs to be used for configuring the Tigris database.\n * @returns A Promise that resolves to a new instance of TigrisVectorStore.\n */\n static fromDocuments(docs: Document[], embeddings: EmbeddingsInterface, dbConfig: TigrisLibArgs): Promise<TigrisVectorStore>;\n /**\n * Static method to create a new instance of TigrisVectorStore from an\n * existing index.\n * @param embeddings An instance of Embeddings to be used for embedding the documents.\n * @param dbConfig An instance of TigrisLibArgs to be used for configuring the Tigris database.\n * @returns A Promise that resolves to a new instance of TigrisVectorStore.\n */\n static fromExistingIndex(embeddings: EmbeddingsInterface, dbConfig: TigrisLibArgs): Promise<TigrisVectorStore>;\n}\n//# sourceMappingURL=tigris.d.ts.map"],"mappings":";;;;;;;;AAOA;AAOA;AAG4BA,KAVhBG,aAAAA,GAUgBH;EAA2BG,KAAAA,EAAAA,GAAAA;CAO3BD;;;;;AAqB+DA,cA/BtEE,iBAAAA,SAA0BH,WAAAA,CA+B4CC;EAATG,KAAAA,CAAAA,EAAAA,GAAAA;EAUFL,gBAAAA,CAAAA,CAAAA,EAAAA,MAAAA;EAA+BG,WAAAA,CAAAA,UAAAA,EAtCnFH,mBAsCmFG,EAAAA,IAAAA,EAtCxDA,aAsCwDA;EAAwBC;;;;;;EASjCC,YAAAA,CAAAA,SAAAA,EAxC1EH,QAwC0EG,EAAAA,EAAAA,OAQ9BF,CAR8BE,EAAAA;IAQ7DL,GAAAA,CAAAA,EAAAA,MAAAA,EAAAA;EAA+BG,CAAAA,GAAAA,MAAAA,EAAAA,CAAAA,EA9CrDE,OA8CqDF,CAAAA,IAAAA,CAAAA;EAAwBC;;;AA1DtC;;;;6CAoBXF;;iBAE5BG;;;;;;;;;gFAS+DA,SAASH,SAASI;;;;;;;;;;8EAUpBN,+BAA+BG,gBAAgBE,QAAQD;;;;;;;;;6BASxGF,wBAAwBF,+BAA+BG,gBAAgBE,QAAQD;;;;;;;;uCAQrEJ,+BAA+BG,gBAAgBE,QAAQD"}