Skip to content

Commit 4d9dda6

Browse files
committed
Fix Langgraph import guard
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
1 parent 822edf8 commit 4d9dda6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

dapr/ext/langgraph/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@
1313
limitations under the License.
1414
"""
1515

16+
_LANGGRAPH_OPTIONAL_MODULES = frozenset({'msgpack', 'langchain_core', 'langgraph', 'ulid'})
17+
1618
try:
1719
from dapr.ext.langgraph.dapr_checkpointer import DaprCheckpointer
1820
except ImportError as exc:
19-
if exc.name != 'langgraph':
21+
if exc.name not in _LANGGRAPH_OPTIONAL_MODULES:
2022
raise
2123
raise ImportError(
2224
f'dapr.ext.langgraph is missing an optional dependency ({exc.name!r}). '

0 commit comments

Comments
 (0)