dialog2graph.pipelines.helpers.find_cycle_ends#

The module provides graph auxilary method to find cycle ends.

Functions#

find_cycle_ends(→ dict[str])

Find nodes in a dialog graph G using conditions in graph_ends_prompt_template with the help of model.

Module Contents#

dialog2graph.pipelines.helpers.find_cycle_ends.find_cycle_ends(G: dialog2graph.pipelines.core.graph.Graph, cycle_ends_model: langchain_core.language_models.chat_models.BaseChatModel) dict[str][source]#

Find nodes in a dialog graph G using conditions in graph_ends_prompt_template with the help of model.

Parameters:
  • G (BaseGraph) – The dialog graph

  • cycle_ends_model (BaseChatModel) – The LLM to be used

Returns:

{‘value’: bool, ‘description’: str}

Return type:

dict