export * from '@llamaindex/core/storage/chat-store'; import { KVDocumentStore, BaseDocumentStore } from '@llamaindex/core/storage/doc-store'; export * from '@llamaindex/core/storage/doc-store'; import { BaseIndexStore } from '@llamaindex/core/storage/index-store'; export * from '@llamaindex/core/storage/index-store'; import { SimpleKVStore } from '@llamaindex/core/storage/kv-store'; export * from '@llamaindex/core/storage/kv-store'; import { Logger } from '@llamaindex/env'; import { VectorStoreByType, BaseVectorStore } from '@llamaindex/core/vector-store'; type SaveDict = Record; declare class SimpleDocumentStore extends KVDocumentStore { private kvStore; constructor(kvStore?: SimpleKVStore, namespace?: string); static fromPersistDir(persistDir?: string, namespace?: string, options?: { logger?: Logger; }): Promise; static fromPersistPath(persistPath: string, namespace?: string, options?: { logger?: Logger; }): Promise; persist(persistPath?: string): Promise; static fromDict(saveDict: SaveDict, namespace?: string): SimpleDocumentStore; toDict(): SaveDict; } /** * Checks if a file exists. * Analogous to the os.path.exists function from Python. * @param path The path to the file to check. * @returns A promise that resolves to true if the file exists, false otherwise. */ declare function exists(path: string): Promise; /** * Recursively traverses a directory and yields all the paths to the files in it. * @param dirPath The path to the directory to traverse. */ declare function walk(dirPath: string): AsyncIterable; interface StorageContext { docStore: BaseDocumentStore; indexStore: BaseIndexStore; vectorStores: VectorStoreByType; } type BuilderParams = { docStore: BaseDocumentStore; indexStore: BaseIndexStore; vectorStore: BaseVectorStore; vectorStores: VectorStoreByType; persistDir: string; }; declare function storageContextFromDefaults({ docStore, indexStore, vectorStore, vectorStores, persistDir, }: Partial): Promise; export { SimpleDocumentStore, exists, storageContextFromDefaults, walk }; export type { StorageContext };