StorageContext.from_defaults(persist_dir)
i get a FileNotFoundError: [Errno 2] No such file or .../docstore.json
. shouldn't that be created if it doesn't exist (first time) and otherwise loaded in?def make_or_load_memory_storage_context(): memory_storage_context = StorageContext.from_defaults(persist_dir="/tmp/.engi/memory/storage_context/") memory_storage_context.persist("/tmp/.engi/memory/storage_context/") return memory_storage_context
def make_or_load_memory_storage_context(): memory_storage_context = StorageContext.from_defaults(persist_dir="/tmp/.engi/memory/storage_context/") memory_storage_context.persist() return memory_storage_context
def make_or_load_memory_storage_context(): try: memory_storage_context = StorageContext.from_defaults( persist_dir="/tmp/.engi/memory/storage_context/" ) except Exception as e: print('persisting first') memory_storage_context = StorageContext.from_defaults() memory_storage_context.persist("/tmp/.engi/memory/storage_context/") return memory_storage_context