You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @thinley4! I'm here to help you with any bugs, questions, or contributions you have. Let's work together to resolve the issue you're facing.
To resolve the TypeError indicating that prompt.invoke is not a function, ensure that you are correctly importing and using the ChatPromptTemplate class. The invoke method is defined within the ChatPromptTemplate class, so the error might be due to an incorrect import or usage.
Here is an example of how to correctly import and use the ChatPromptTemplate class:
Ensure that the ChatPromptTemplate class is correctly imported from the @langchain/core/prompts module and that you are calling the invoke method on an instance of ChatPromptTemplate. Additionally, make sure that the pull function is correctly used to fetch the prompt template. Note that the import paths have been updated to reflect the new module structure as per the latest changes in the langchain library [1][2][3].
Checklist
Issue with current documentation:
If I replace this code:
import { ChatPromptTemplate } from "@langchain/core/prompts";
import { pull } from "langchain/hub";
const prompt = await pull("rlm/rag-prompt");
Error
With this code:
import * as hub from "langchain/hub";
const prompt = await hub.pull("rlm/rag-prompt");
Everything works fine.
Idea or request for content:
No response
The text was updated successfully, but these errors were encountered: