Hey everyone! 👋 Did you know that 97.5% of my viewers aren’t subscribed? If you found this tutorial helpful, consider subscribing to the channel. It’s free and doesn’t hurt anyone, but it means a lot to me. Plus, it’s a great way to stay updated with the latest coding tips and tricks. Thanks for your support! 🙏
@EshaalakshmiDS-x5qАй бұрын
Thank you soo much for the video!! It gives us reference on how to instill Long Term memory to LangGraph Applications. Truly useful!!
@RomanH91Ай бұрын
This is what I was looking for! The PostgreSQL persistent memory to the LangGraph. I needed it in TypeScript, but at least it's available in Python. Don't have so much information about it on the Web. Thank you!
@rokbenkoАй бұрын
@RomanH91 I wanted to show a JS example too, but it looks like LangChain hasn't implemented it in the JS SDK yet.
@RomanH91Ай бұрын
@rokbenko I found documentation on the PostgresSaver. Do you think it’s still in beta? Possible to find by searching on the website: 'persistence-postgres'. The direct link doesn't work :(
@TheNearAndAway26 күн бұрын
@@rokbenko It looks like it's available in the JS SDK now
@rokbenko24 күн бұрын
@@TheNearAndAway Can you please share the link here?
@rizkyjanu23186 күн бұрын
@@rokbenko is it available on JS now? I use TS built my chatbot and need it to long term memory ❤
@ExamplistАй бұрын
At first I was hesitant about the AI voice, but I like how aggressively it is yelling at me
@rokbenko29 күн бұрын
Can’t tell if it’s sarcasm or the best feedback ever. Either way, I’ll take it.
@StratenSchemel12 күн бұрын
@@rokbenko Dude your git repo is gold. Your youtube videos are excellent. I think the AI voice is off putting and why this channel doesn't have 100k subscribers. It was hard to get past the first 2 minutes on some of your videos but after realizing that it's legit content and not a scammy clickbait video I was all in. I would tinker with some different voices or do your own voice over. PS: do you have a BuyMeCoffee page?
@rokbenko12 күн бұрын
@@StratenSchemel Thanks for the detailed feedback! I was thinking about this a lot, but so far, the channel is growing, although it might be growing even faster not using AI voiceover. I don't know. Maybe I'll change the course. Here you go: buymeacoffee.com/rokbenko
@StratenSchemel12 күн бұрын
@@rokbenko Couldn't hurt to experiment. But your content is is really good. Keep it up your tutorials have saved me hours! Thank You!
@aifarmerokayАй бұрын
❤ I was checking exactly same
@jungin.johnny2 күн бұрын
Thank you for the kind video. It seems that 4 tables(checkpoints, checkpoint_blobs, ...) including are automatically created in the public schema of database in postgresql. If I want to use multiple graph or chatbots, do I have to create multiple databases in postgresql?
@rokbenkoКүн бұрын
If you want to store different chats, then simply set the different thread_id parameter to a different string. In my example, I set it to "1". You can set it to "2" or whatever works for you. All chats will be stored in the same PostgreSQL tables, though.
@jungin.johnnyКүн бұрын
@@rokbenko Thanks for the reply! I think that's the best way to do it.
@simone24Ай бұрын
Interesting video. Wouldn't be useful to give to every message an ID and to store in the checkpoint the list of IDs? LLM could retrieve messages from IDs and it would save a lot of tokens. Does it make sense?
@RomanH91Ай бұрын
Tokens increase when a dialog is long. How can I optimize it? Thank you for your answer!
@oscarbastidas-q3yАй бұрын
Hi, thank you for this amazing tutorial, keep doing it :)! I have a couple of questions I hope you can help with. Specifically, do you know how to interact with the database for tasks like removing a thread ID or checkpoint ID? I couldn’t find any direct LangGraph operations with the memory in the documentation for handling these scenarios. My current workaround is using direct PostgreSQL queries, but I’m unsure if that’s the best approach. Would love to hear your thoughts if you’ve worked on something similar. Thanks in advance!
@rokbenkoАй бұрын
@oscarbastidas-q3y What do you mean by saying "removing a thread ID"? What's your goal?
@oscarbastidas-q3yАй бұрын
@@rokbenko As you know, every conversation is associated with a thread ID, checkpoint ID, and other identifiers. For instance, suppose I no longer needed to store a conversation, I resolved this by removing the thread ID using SQL queries. My question is, can I do this using a command from the langraph package?
@rokbenkoАй бұрын
@@oscarbastidas-q3y It's not possible to delete past useless conversations from PostgreSQL using the LangGraph SDK. As far as I know...
@work1321Ай бұрын
Hi, do we need to create a DB and table agent_chat ourselves or the code does it?
@rokbenko29 күн бұрын
To be honest, I don't remember since I'm experimenting with AI a lot. Try to run the script, and if you get an error, then you need to set up the table yourself. I think I did it myself, but as I said, I'm not sure.
@work132128 күн бұрын
@ thanks a lot for replying, i figured it out that we need to create just the db and then run the script, by the way do you have any source or material 1]where you access this stored database for another agent? 2] handling cross thread persistence according to user ids
@aifarmerokayАй бұрын
what schema tables actully needed for postgree . im facing issue for that
@rokbenkoАй бұрын
@aifarmerokay Did you follow the exact steps from the tutorial? What's the issue you're facing? Can you explain, please?
@hasnainkhan2959Ай бұрын
Hey man, thanks for the video. It was really helpful. I am using the same code as you used in your video and I am getting this error: psycopg.errors.DuplicatePreparedStatement: prepared statement "_pg3_1" already exists I used await memory.setup() as this was first time. I tried to run it with commenting it but it is giving me the same error.