Create a backend factory that creates a new VFS backend per invocation.
createVfsBackendFactory(options: VfsBackendOptions): () => Promise<VfsBackend>| Name | Type | Description |
|---|---|---|
options | VfsBackendOptions | Optional configuration for backend creation |
import { VfsBackend, createVfsBackendFactory } from "@langchain/node-vfs";
const factory = createVfsBackendFactory({
initialFiles: { "/README.md": "# Hello" },
});
const backend = await factory();