render_graphviz#
- langchain_community.graph_vectorstores.visualize.render_graphviz(documents: Iterable[Document], engine: str | None = None, node_color: str | None = None, node_colors: Dict[str, str | None] | None = None, skip_tags: Iterable[Tuple[str, str]] = ()) graphviz.Digraph [source]#
Beta
This feature is in beta. It is actively being worked on, so the API may change.
Render a collection of GraphVectorStore documents to GraphViz format.
- Parameters:
documents (Iterable[Document]) β The documents to render.
engine (str | None) β GraphViz layout engine to use. None uses the default.
node_color (str | None) β Default node color.
node_colors (Dict[str, str | None] | None) β Dictionary specifying colors of specific nodes. Useful for emphasizing nodes that were selected by MMR, or differ from other results.
skip_tags (Iterable[Tuple[str, str]]) β Set of tags to skip when rendering the graph. Specified as tuples containing the kind and tag.
- Returns:
The βgraphviz.Digraphβ representing the nodes. May be printed to source, or rendered using dot.
- Return type:
graphviz.Digraph
Note
To render the generated DOT source code, you also need to install Graphviz_ (download page, archived versions, installation procedure for Windows).