You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched the LangGraph/LangChain documentation with the integrated search.
I used the GitHub search to find a similar question and didn't find it.
I am sure that this is a bug in LangGraph/LangChain rather than my code.
I am sure this is better as an issue rather than a GitHub discussion, since this is a LangGraph bug and not a design question.
Example Code
fromlanggraph.checkpoint.postgresimportPostgresSaverfrompsycopgimportConnectionDB_URI="postgresql://postgres:postgres@localhost:5432/llama_db?sslmode=disable"connection_kwargs= {
"autocommit": True,
"prepare_threshold": 0,
}
withConnection.connect(DB_URI, **connection_kwargs) asconn:
checkpointer=PostgresSaver(conn)
# NOTE: you need to call .setup() the first time you're using your checkpointercheckpointer.setup()
# Finally, we compile it!app=workflow.compile(checkpointer=checkpointer)
config= {"configurable": {"thread_id": "1"}}
whileTrue:
user_input=input("User: ")
ifuser_input.lower() in ["quit","q"]:
print("Good Bye")
breakforeventinapp.stream({'messages': user_input}, config, stream_mode='updates'):
forvalueinevent.values():
passprint_update(event)
print("Assistant:",value["messages"][0].content)
Error Message and Stack Trace (if applicable)
psycopg.errors.UndefinedTable: relation "checkpoints" does not exist
LINE 34: from checkpoints WHERE thread_id = $1 AND checkpoint_ns = $2...
Description
I was trying this example to create a custom chatbot with memory that is managed according to my logic instead of 6 messages. When i try to use Postgres instead of MemorySaver() I get the above error message that 'checkpoints' table doesn't exist.
@vignesh-spericorn were there any errors from running checkpointer.setup()? the error you're seeing seems to indicate that .setup() didn't properly run
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
Description
I was trying this example to create a custom chatbot with memory that is managed according to my logic instead of 6 messages. When i try to use Postgres instead of
MemorySaver()
I get the above error message that 'checkpoints' table doesn't exist.System Info
Ubuntu 20.04
Python 3.11.10
langgraph==0.2.34
langgraph-checkpoint==2.0.1
langgraph-checkpoint-postgres==2.0.1
The text was updated successfully, but these errors were encountered: