feat(pregel): mark graph as serializable

This commit is contained in:
Tat Dat Duong
2024-04-30 22:18:10 +02:00
parent c293d3d71d
commit 2e3a690b34
+5
View File
@@ -211,6 +211,11 @@ class Pregel(
class Config:
arbitrary_types_allowed = True
@classmethod
def is_lc_serializable(cls) -> bool:
"""Return whether the graph can be serialized by Langchain."""
return True
@root_validator(skip_on_failure=True)
def validate_on_init(cls, values: dict[str, Any]) -> dict[str, Any]:
if not values["auto_validate"]: