• Load a prompt from LangchainHub or local filesystem.

    Parameters

    • uri: string

    Returns Promise<BasePromptTemplate>

    Example

    Loading from LangchainHub:

    import { loadPrompt } from "langchain/prompts/load";
    const prompt = await loadPrompt("lc://prompts/hello-world/prompt.yaml");

    Example

    Loading from local filesystem:

    import { loadPrompt } from "langchain/prompts/load";
    const prompt = await loadPrompt("/path/to/prompt.json");

Generated using TypeDoc