GenAI.Graph.MermaidProtocol.Helpers (GenAI Core v0.3.1)

Copy Markdown

Helpers for generating Mermaid graphs using the GenAI.Graph.MermaidProtocol protocol.

Summary

Functions

Return the diagram type.

Indent a string by a given depth.

Format id for mermaid compatibility.

Functions

diagram_type(options)

@spec diagram_type(options :: term()) :: atom()

Return the diagram type.

indent(string, depth \\ 1)

@spec indent(string :: String.t(), depth :: integer()) :: String.t()

Indent a string by a given depth.

mermaid_id(id)

@spec mermaid_id(term()) :: term()

Format id for mermaid compatibility.