Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/hotfixes' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
fit-alessandro-berti committed Apr 2, 2024
2 parents d5f12e7 + de0696f commit 285df5c
Show file tree
Hide file tree
Showing 6 changed files with 2,212 additions and 1,264 deletions.
2 changes: 2 additions & 0 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ The following methods provides just the abstractions of the given objects:
* :meth:`pm4py.llm.abstract_petri_net`; provides the abstraction of a Petri net
* :meth:`pm4py.llm.abstract_declare`; provides the abstraction of a DECLARE model
* :meth:`pm4py.llm.abstract_log_skeleton`; provides the abstraction of a log skeleton model
* :meth:`pm4py.llm.explain_visualization`; explains one of the visualizations provided in pm4py using LVMs.

The following methods can be executed directly against the LLM APIs:

Expand Down Expand Up @@ -629,6 +630,7 @@ Overall List of Methods
pm4py.llm.abstract_declare
pm4py.llm.abstract_log_skeleton
pm4py.llm.openai_query
pm4py.llm.explain_visualization
pm4py.connectors.extract_log_outlook_mails
pm4py.connectors.extract_log_outlook_calendar
pm4py.connectors.extract_log_windows_events
Expand Down
7 changes: 7 additions & 0 deletions examples/llm/abstractions/log_to_acti_summary.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import pm4py
from pm4py.objects.conversion.log import converter as log_converter
from typing import Union, Optional, Dict, Any
from pm4py.objects.log.obj import EventLog, EventStream
Expand Down Expand Up @@ -122,3 +123,9 @@ def apply(log_obj: Union[EventLog, EventStream, pd.DataFrame],
ret += "\n\n"

return ret


if __name__ == "__main__":
log = pm4py.read_xes("../../../tests/input_data/receipt.xes")
textual_abstraction = apply(log)
print(textual_abstraction)
7 changes: 7 additions & 0 deletions examples/llm/abstractions/log_to_top_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from enum import Enum
from pm4py.util import exec_utils, constants, xes_constants
import pandas as pd
import pm4py
from copy import copy


Expand Down Expand Up @@ -138,3 +139,9 @@ def apply(log: Union[EventLog, EventStream, pd.DataFrame], parameters: Optional[
ret = new_ret

return get_abstr_from_dict(ret, activities_dict, response_header)


if __name__ == "__main__":
log = pm4py.read_xes("../../../tests/input_data/receipt.xes")
textual_abstraction = apply(log)
print(textual_abstraction)
7 changes: 7 additions & 0 deletions examples/llm/abstractions/log_to_var_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from pm4py.objects.log.obj import EventLog, EventStream
from enum import Enum
from pm4py.util import exec_utils, constants, xes_constants
import pm4py
import pandas as pd


Expand Down Expand Up @@ -99,3 +100,9 @@ def apply(log_obj: Union[EventLog, EventStream, pd.DataFrame], parameters: Optio
ret = ret + "\n\n"

return ret


if __name__ == "__main__":
log = pm4py.read_xes("../../../tests/input_data/receipt.xes")
textual_abstraction = apply(log)
print(textual_abstraction)
Loading

0 comments on commit 285df5c

Please sign in to comment.