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