• Load a chain from LangchainHub or local filesystem.

    Parameters

    • uri: string
    • values: LoadValues = {}

    Returns Promise<BaseChain<ChainValues, ChainValues>>

    Example

    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" });

    Example

    Loading from local filesystem:

    import { loadChain } from "langchain/chains/load";
    const chain = await loadChain("/path/to/chain.json");

    ⚠️ Deprecated ⚠️

    Use newer load method.

    This feature is deprecated and will be removed in the future.

    It is not recommended for use.

Generated using TypeDoc