Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
nfcampos committed Feb 19, 2024
1 parent dadf63f commit b871c58
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 44 deletions.
5 changes: 5 additions & 0 deletions libs/core/langchain_core/runnables/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ def to_json(self) -> Dict[str, List[Dict[str, Any]]]:
"target": stable_node_ids[edge.target],
"data": edge.data,
}
if edge.data is not None
else {
"source": stable_node_ids[edge.source],
"target": stable_node_ids[edge.target],
}
for edge in self.edges
],
}
Expand Down
66 changes: 22 additions & 44 deletions libs/langchain/tests/unit_tests/load/__snapshots__/test_dump.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -533,13 +533,11 @@
"edges": [
{
"source": 0,
"target": 1,
"data": null
"target": 1
},
{
"source": 1,
"target": 2,
"data": null
"target": 2
}
]
}
Expand Down Expand Up @@ -981,13 +979,11 @@
"edges": [
{
"source": 0,
"target": 1,
"data": null
"target": 1
},
{
"source": 1,
"target": 2,
"data": null
"target": 2
}
]
}
Expand Down Expand Up @@ -1039,13 +1035,11 @@
"edges": [
{
"source": 0,
"target": 1,
"data": null
"target": 1
},
{
"source": 1,
"target": 2,
"data": null
"target": 2
}
]
}
Expand Down Expand Up @@ -1850,13 +1844,11 @@
"edges": [
{
"source": 0,
"target": 1,
"data": null
"target": 1
},
{
"source": 1,
"target": 2,
"data": null
"target": 2
}
]
}
Expand Down Expand Up @@ -2322,13 +2314,11 @@
"edges": [
{
"source": 0,
"target": 1,
"data": null
"target": 1
},
{
"source": 1,
"target": 2,
"data": null
"target": 2
}
]
}
Expand Down Expand Up @@ -2758,13 +2748,11 @@
"edges": [
{
"source": 0,
"target": 1,
"data": null
"target": 1
},
{
"source": 1,
"target": 2,
"data": null
"target": 2
}
]
}
Expand Down Expand Up @@ -2816,13 +2804,11 @@
"edges": [
{
"source": 0,
"target": 1,
"data": null
"target": 1
},
{
"source": 1,
"target": 2,
"data": null
"target": 2
}
]
}
Expand Down Expand Up @@ -3303,13 +3289,11 @@
"edges": [
{
"source": 0,
"target": 1,
"data": null
"target": 1
},
{
"source": 1,
"target": 2,
"data": null
"target": 2
}
]
}
Expand Down Expand Up @@ -3751,13 +3735,11 @@
"edges": [
{
"source": 0,
"target": 1,
"data": null
"target": 1
},
{
"source": 1,
"target": 2,
"data": null
"target": 2
}
]
}
Expand Down Expand Up @@ -3809,13 +3791,11 @@
"edges": [
{
"source": 0,
"target": 1,
"data": null
"target": 1
},
{
"source": 1,
"target": 2,
"data": null
"target": 2
}
]
}
Expand Down Expand Up @@ -4286,13 +4266,11 @@
"edges": [
{
"source": 0,
"target": 1,
"data": null
"target": 1
},
{
"source": 1,
"target": 2,
"data": null
"target": 2
}
]
}
Expand Down

0 comments on commit b871c58

Please sign in to comment.