Render a collection of GraphVectorStore documents to GraphViz format.
render_graphviz(
documents: Iterable[Document],
engine: Optional[str] = None,
node_color: Optional[str] = None,
node_colors: Optional[Dict[str, Optional[str]]] = None,
skip_tags: Iterable[Tuple[str, str]] = ()
) -> graphviz.DigraphNote:
To render the generated DOT source code, you also need to install Graphviz_
(download page <https://www.graphviz.org/download/>,
archived versions <https://www2.graphviz.org/Archive/stable/>,
installation procedure for Windows <https://forum.graphviz.org/t/new-simplified-installation-procedure-on-windows/224>_).
| Name | Type | Description |
|---|---|---|
documents* | Iterable[Document] | The documents to render. |
engine | Optional[str] | Default: NoneGraphViz layout engine to use. |
node_color | Optional[str] | Default: NoneDefault node color. |
node_colors | Optional[Dict[str, Optional[str]]] | Default: NoneDictionary 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]] | Default: ()Set of tags to skip when rendering the graph. Specified as tuples containing the kind and tag. |