PostgresSaver.list() unnecessarily requires thread_id #2396
epistoteles
started this conversation in
Ideas
Replies: 3 comments
-
@epistoteles this is a good suggestion, thank you! we'll relax this across checkpointers, stay tuned |
Beta Was this translation helpful? Give feedback.
0 replies
-
Happy to submit my own PR if you're fine with that :) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Setting config to none works for me at the moment. saver.list(
config=None,
filter={
"user_id": user_id
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
TL;DR: Feature request for relaxation of the assumptions of _search_where() in BasePostgresSaver, such that queries like this become possible: "Show me all checkpoints with a given user_id in the metadata".
I have a PostgresSaver that automatically saves threads with the following config:
{"configurable": {"thread_id": thread_id, "user_id": user_id}}
I would like to use the PostgresSaver.list() function to list all threads that belong to a given user_id. I believe I can filter by user_id with a metadata filter, but the underying BasePostgresSaver._search_where() requires a thread_id as a where filter from the configurable:
In my view this is not necessary. It should be possible to retrieve checkpoints with an emtpy configurable and only metadata filters, like this:
Please make me aware of cases in which this change would cause trouble.
Beta Was this translation helpful? Give feedback.
All reactions