pm4py.llm.explain_visualization#

pm4py.llm.explain_visualization(vis_saver, *args, connector=<function openai_query>, **kwargs) str[source]#

Explains a process mining visualization by using LLMs (saving that first in a .png image, then providing the .png file to the Large Language Model along with possibly a description of the visualization).

Parameters:
  • vis_saver – the visualizer (saving to disk) to be used

  • args – the mandatory arguments that should be provided to the visualization

  • connector – the connector method to the large language model

  • kwargs – optional parameters of the visualization or the connector (for example, the annotation of the visualization, or the API key)

Return type:

str

import pm4py

log = pm4py.read_xes("tests/input_data/running-example.xes")
descr = pm4py.llm.explain_visualization(pm4py.save_vis_dotted_chart, log, api_key="sk-5HN", show_legend=False)
print(descr)