import { Docstore } from "./base.js"; import { Document } from "@langchain/core/documents"; import { BaseStoreInterface } from "@langchain/core/stores"; //#region src/stores/doc/in_memory.d.ts /** * Class for storing and retrieving documents in memory asynchronously. * Extends the Docstore class. */ declare class InMemoryDocstore extends Docstore implements BaseStoreInterface { _docs: Map; constructor(docs?: Map); /** * Searches for a document in the store based on its ID. * @param search The ID of the document to search for. * @returns The document with the given ID. */ search(search: string): Promise; /** * Adds new documents to the store. * @param texts An object where the keys are document IDs and the values are the documents themselves. * @returns Void */ add(texts: Record): Promise; mget(keys: string[]): Promise; mset(keyValuePairs: [string, Document][]): Promise; mdelete(_keys: string[]): Promise; yieldKeys(_prefix?: string): AsyncGenerator; } /** * Class for storing and retrieving documents in memory synchronously. */ declare class SynchronousInMemoryDocstore { _docs: Map; constructor(docs?: Map); /** * Searches for a document in the store based on its ID. * @param search The ID of the document to search for. * @returns The document with the given ID. */ search(search: string): Document; /** * Adds new documents to the store. * @param texts An object where the keys are document IDs and the values are the documents themselves. * @returns Void */ add(texts: Record): void; } //#endregion export { InMemoryDocstore, SynchronousInMemoryDocstore }; //# sourceMappingURL=in_memory.d.ts.map