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).