From d0b818b634ff72ad6e50205abebeb7e822b21c14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Z=C4=85bek?= <87642985+Glueish@users.noreply.github.com> Date: Wed, 29 Nov 2023 04:42:43 +0100 Subject: [PATCH] DOCS: added missing imports (#13736) (#13737) - **Description:** Fixed missing imports in docs - **Issue:** [#13736](https://github.com/langchain-ai/langchain/issues/13736) - **Dependencies:** N/A --- .../prompts/prompt_templates/msg_prompt_templates.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/docs/modules/model_io/prompts/prompt_templates/msg_prompt_templates.mdx b/docs/docs/modules/model_io/prompts/prompt_templates/msg_prompt_templates.mdx index 4eafb0c973..22c73a88f8 100644 --- a/docs/docs/modules/model_io/prompts/prompt_templates/msg_prompt_templates.mdx +++ b/docs/docs/modules/model_io/prompts/prompt_templates/msg_prompt_templates.mdx @@ -27,6 +27,8 @@ LangChain also provides `MessagesPlaceholder`, which gives you full control of w ```python from langchain.prompts import MessagesPlaceholder +from langchain.prompts import HumanMessagePromptTemplate +from langchain.prompts import ChatPromptTemplate human_prompt = "Summarize our conversation so far in {word_count} words." human_message_template = HumanMessagePromptTemplate.from_template(human_prompt) @@ -36,6 +38,8 @@ chat_prompt = ChatPromptTemplate.from_messages([MessagesPlaceholder(variable_nam ```python +from langchain.schema.messages import HumanMessage, AIMessage + human_message = HumanMessage(content="What is the best way to learn programming?") ai_message = AIMessage(content="""\ 1. Choose a programming language: Decide on a programming language that you want to learn.