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.
This commit is contained in:
Imad Saddik
2024-12-13 09:38:17 -05:00
committed by GitHub
parent da0aac7556
commit e494869c72
+2 -2
View File
@@ -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.