From e494869c72c9f86c505e8409df9dccceefded5e4 Mon Sep 17 00:00:00 2001 From: Imad Saddik <79410781+ImadSaddik@users.noreply.github.com> Date: Fri, 13 Dec 2024 15:38:17 +0100 Subject: [PATCH] Fixed the documentation for the persistence concept (#2750) Hi, I was reading the [persistence](https://langchain-ai.github.io/langgraph/concepts/persistence/#update-state) concept in LangGraph and found a sentence with a missing verb, so I fixed it. --- docs/docs/concepts/persistence.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/concepts/persistence.md b/docs/docs/concepts/persistence.md index dccf6a36f..f3a014157 100644 --- a/docs/docs/concepts/persistence.md +++ b/docs/docs/concepts/persistence.md @@ -168,7 +168,7 @@ Importantly, LangGraph knows whether a particular checkpoint has been executed p ### Update state -In addition to re-playing the graph from specific `checkpoints`, we can also *edit* the graph state. We do this using `graph.update_state()`. This method three different arguments: +In addition to re-playing the graph from specific `checkpoints`, we can also *edit* the graph state. We do this using `graph.update_state()`. This method accepts three different arguments: #### `config` @@ -222,7 +222,7 @@ The final thing you can optionally specify when calling `update_state` is `as_no A [state schema](low_level.md#schema) specifies a set of keys that are populated as a graph is executed. As discussed above, state can be written by a checkpointer to a thread at each graph step, enabling state persistence. -But, what if we want to retrain some information *across threads*? Consider the case of a chatbot where we want to retain specific information about the user across *all* chat conversations (e.g., threads) with that user! +But, what if we want to retain some information *across threads*? Consider the case of a chatbot where we want to retain specific information about the user across *all* chat conversations (e.g., threads) with that user! With checkpointers alone, we cannot share information across threads. This motivates the need for the [`Store`](../reference/store.md#langgraph.store.base.BaseStore) interface. As an illustration, we can define an `InMemoryStore` to store information about a user across threads. We simply compile our graph with a checkpointer, as before, and with our new `in_memory_store` variable.