langgraph-checkpoint-mysql
langgraph-checkpoint-mysql copied to clipboard
Library with a MySQL implementation of LangGraph checkpoint saver.
pymysql.err.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(\n json_keys(checkpoint, '$.channel_versions'),\n...
Hi, as you can see, in both PostgreSQL checkpointer and this MySQL checkpointer, the table names are fixed. It is forced to use `checkpoint_migrations`, `checkpoints`, `checkpoint_blobs`, `checkpoint_writes` to store all...
If my database uses `utf8mb4_unicode_ci`, an error will be reported ``` Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_0900_ai_ci,IMPLICIT) for operation '=' ``` My temporary solution ```python SELECT_SQL_FIX = f""" with...
If there are special characters in the password, such as #, it needs to be url-encoded before it can be parsed successfully. However, pymysql needs the password before encoding, otherwise...
DB_URI = "mysql://root:123456@localhost:3306/langgraph?charset=utf8mb4" with PyMySQLSaver.from_conn_string(DB_URI) as checkpointer: config = {"configurable": {"thread_id": 2}} checkpointer.setup() graph = workflow.compile(checkpointer=checkpointer) state = {"input": "主动向用户提问,获取用户病情的,主要症状、持续时间、症状具体描述、检查和用药情况及治疗"} for event in graph.stream(state, config=config, stream_mode="values"): for value in event.values():...
Hello. I want to use PyMySQLSaver instead of MemorySaver for checkpoints in LangGraph. So I want to connect MariaDB with PyMySQLSaver, When I connect with the code in the README.md,...
Not quite sure how to solve this yet, but when using this in a long-lived application like with an API, the connection will eventually get terminated because it only gets...
I am Working with LangGraph with my FastAPI application. I want to persist the memory. I was initially using the InMemory MemorySaver. Now I want to shift to the MySQL...
after this process, the string is converted to "\-\\u001f", and \- will fail when performing json.loads(), and this is also not the expected result to be stored. think it can...
File "/home/yhx/wc/env/lib/python3.12/site-packages/langgraph/checkpoint/mysql/__init__.py", line 235, in get_tuple cur.execute( File "/home/yhx/wc/env/lib/python3.12/site-packages/pymysql/cursors.py", line 153, in execute result = self._query(query) ^^^^^^^^^^^^^^^^^^ File "/home/yhx/wc/env/lib/python3.12/site-packages/pymysql/cursors.py", line 322, in _query conn.query(q) File "/home/yhx/wc/env/lib/python3.12/site-packages/pymysql/connections.py", line 563, in query...