@langchain/langgraph-checkpoint-mongodb
Advanced tools
Comparing version
@@ -108,9 +108,10 @@ import { BaseCheckpointSaver, } from "@langchain/langgraph-checkpoint"; | ||
const { limit, before, filter } = options ?? {}; | ||
let query = {}; | ||
if (config?.configurable) { | ||
query = { | ||
thread_id: config.configurable.thread_id, | ||
checkpoint_ns: config.configurable.checkpoint_ns ?? "", | ||
}; | ||
const query = {}; | ||
if (config?.configurable?.thread_id) { | ||
query.thread_id = config.configurable.thread_id; | ||
} | ||
if (config?.configurable?.checkpoint_ns !== undefined && | ||
config?.configurable?.checkpoint_ns !== null) { | ||
query.checkpoint_ns = config.configurable.checkpoint_ns; | ||
} | ||
if (filter) { | ||
@@ -117,0 +118,0 @@ Object.entries(filter).forEach(([key, value]) => { |
{ | ||
"name": "@langchain/langgraph-checkpoint-mongodb", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "LangGraph", | ||
@@ -43,3 +43,3 @@ "type": "module", | ||
"@langchain/langgraph-checkpoint": "workspace:*", | ||
"@langchain/scripts": ">=0.1.2 <0.2.0", | ||
"@langchain/scripts": ">=0.1.3 <0.2.0", | ||
"@swc/core": "^1.3.90", | ||
@@ -65,3 +65,3 @@ "@swc/jest": "^0.2.29", | ||
"release-it": "^17.6.0", | ||
"rollup": "^4.5.2", | ||
"rollup": "^4.23.0", | ||
"ts-jest": "^29.1.0", | ||
@@ -68,0 +68,0 @@ "tsx": "^4.7.0", |
Sorry, the diff of this file is not supported yet
25575
0.88%511
0.39%