From 1a0ad5fdd0673d8be0ae4813edc01dda3d90330e Mon Sep 17 00:00:00 2001 From: Akarsha Sehwag Date: Mon, 29 Jul 2024 17:23:48 +0200 Subject: [PATCH] fix: update the function for node colors NodeColors does not exist anymore in Langchain_core -> updated to NodeStyles and changed the param names. --- examples/visualization.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/visualization.ipynb b/examples/visualization.ipynb index 43f06aefb..7e7c83ab6 100644 --- a/examples/visualization.ipynb +++ b/examples/visualization.ipynb @@ -268,7 +268,7 @@ ], "source": [ "from IPython.display import Image, display\n", - "from langchain_core.runnables.graph import CurveStyle, MermaidDrawMethod, NodeColors\n", + "from langchain_core.runnables.graph import CurveStyle, MermaidDrawMethod, NodeStyles\n", "\n", "display(\n", " Image(\n", @@ -340,7 +340,7 @@ " Image(\n", " app.get_graph().draw_mermaid_png(\n", " curve_style=CurveStyle.LINEAR,\n", - " node_colors=NodeColors(start=\"#ffdfba\", end=\"#baffc9\", other=\"#fad7de\"),\n", + " node_colors=NodeStyles(first=\"#ffdfba\", last=\"#baffc9\", default=\"#fad7de\"),\n", " wrap_label_n_words=9,\n", " output_file_path=None,\n", " draw_method=MermaidDrawMethod.PYPPETEER,\n",