-
Hey there, I am using SqliteSaver, in memory, and at some time I would like to be able to reset to empty the state of a graph. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 21 replies
-
Hi @Bennoo . There are a few things you can do: (1) you can just start a new thread -- it will have a new empty state Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
@Bennoo @vbarda how do you recommend same for memory saver and postgressaver? This seems like a legitimate need else your memory will keep on growing |
Beta Was this translation helpful? Give feedback.
-
We need a function to delete the datas! A database can get larger and larger without deleting the outdated thread_ids, eventually either the machine or database will fail... Deleting using the sql, instead of python functions, does not seem to be safe.. |
Beta Was this translation helpful? Give feedback.
-
Any update here? Seems like a basic feature... |
Beta Was this translation helpful? Give feedback.
-
Any idea on Redis Checkpointer ?? I know i can set |
Beta Was this translation helpful? Give feedback.
-
Also adding a creation and last time update timestamps to the checkpoint can help on cleansing the old ones |
Beta Was this translation helpful? Give feedback.
-
Guys this is a required need from the community. When you need to retrieve data from elsewhere the data keeps growing forever too fast, my main issues with states are related to me having too much data in a few interactions between the user and the bot. edit: this is just an opinion, but I think that the docs are not helping people understand the difference of config, state and when to use each of them. When I first started programming in LangGraph I thought that config was something I should never touch and state was my "session", then I discovered I should put my data (like access tokens, user id, etc) in the config because the state is "not safe enough". Right now my state contains tons of data and I always thought that I would have total control of it, but right now I find myself limited by it. We need an option between the state and config that we are free to manipulate. edit 2: I created this reducer so I can use a "clear" node in the beginning of my graph:
and then in my You could use |
Beta Was this translation helpful? Give feedback.
unfortunately we don't have any resources / examples for that as it's not something we generally recommend. here is the implementation for the sqlite checkpointer with all the relevant tables / queries, so to implement that you would just need to write
DELETE FROM
sql queries