Loading from LangchainHub:
import { loadChain } from "langchain/chains/load";
const chain = await loadChain("lc://chains/hello-world/chain.json");
const res = await chain.call({ topic: "my favorite color" });
Loading from local filesystem:
import { loadChain } from "langchain/chains/load";
const chain = await loadChain("/path/to/chain.json");
Generated using TypeDoc
Load a chain from LangchainHub or local filesystem.