From 7403faa063a47e78f27fd531d6ad1f9e936ebfa4 Mon Sep 17 00:00:00 2001 From: Aashish Saini <141953346+ShorthillsAI@users.noreply.github.com> Date: Mon, 4 Sep 2023 12:39:50 +0530 Subject: [PATCH] Fixed typo in get_started.mdx (#10163) Fix typo: 'Whats up' -> 'What's up' Thanks CC: @baskaryan, @eyurtsev, @rlancemartin. --------- Co-authored-by: Aashish Saini <141953346+AashishSainiShorthillsAI@users.noreply.github.com> Co-authored-by: AryamanJaiswalShorthillsAI <142397527+AryamanJaiswalShorthillsAI@users.noreply.github.com> Co-authored-by: Adarsh Shrivastav <142413097+AdarshKumarShorthillsAI@users.noreply.github.com> Co-authored-by: Vishal <141389263+VishalYadavShorthillsAI@users.noreply.github.com> Co-authored-by: ChetnaGuptaShorthillsAI <142381084+ChetnaGuptaShorthillsAI@users.noreply.github.com> Co-authored-by: PankajKumarShorthillsAI <142473460+PankajKumarShorthillsAI@users.noreply.github.com> Co-authored-by: AbhishekYadavShorthillsAI <142393903+AbhishekYadavShorthillsAI@users.noreply.github.com> Co-authored-by: AmitSinghShorthillsAI <142410046+AmitSinghShorthillsAI@users.noreply.github.com> Co-authored-by: Aayush <142384656+AayushShorthillsAI@users.noreply.github.com> --- docs/snippets/modules/memory/get_started.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/snippets/modules/memory/get_started.mdx b/docs/snippets/modules/memory/get_started.mdx index 906a5b17cc..352b606736 100644 --- a/docs/snippets/modules/memory/get_started.mdx +++ b/docs/snippets/modules/memory/get_started.mdx @@ -7,7 +7,7 @@ from langchain.memory import ConversationBufferMemory memory = ConversationBufferMemory() memory.chat_memory.add_user_message("hi!") -memory.chat_memory.add_ai_message("whats up?") +memory.chat_memory.add_ai_message("what's up?") ``` When using memory in a chain, there are a few key concepts to understand. @@ -28,7 +28,7 @@ memory.load_memory_variables({}) ``` - {'history': "Human: hi!\nAI: whats up?"} + {'history': "Human: hi!\nAI: what's up?"} ``` @@ -41,12 +41,12 @@ For example, if you want the memory variables to be returned in the key `chat_hi ```python memory = ConversationBufferMemory(memory_key="chat_history") memory.chat_memory.add_user_message("hi!") -memory.chat_memory.add_ai_message("whats up?") +memory.chat_memory.add_ai_message("what's up?") ``` ``` - {'chat_history': "Human: hi!\nAI: whats up?"} + {'chat_history': "Human: hi!\nAI: what's up?"} ``` @@ -65,13 +65,13 @@ In order to return as a list of messages, you can set `return_messages=True` ```python memory = ConversationBufferMemory(return_messages=True) memory.chat_memory.add_user_message("hi!") -memory.chat_memory.add_ai_message("whats up?") +memory.chat_memory.add_ai_message("what's up?") ``` ``` {'history': [HumanMessage(content='hi!', additional_kwargs={}, example=False), - AIMessage(content='whats up?', additional_kwargs={}, example=False)]} + AIMessage(content='what's up?', additional_kwargs={}, example=False)]} ```