Skip to content

Commit

Permalink
improved stack
Browse files Browse the repository at this point in the history
  • Loading branch information
tmbo committed Sep 6, 2023
1 parent 2d37576 commit a3391d6
Show file tree
Hide file tree
Showing 28 changed files with 1,239 additions and 703 deletions.
354 changes: 0 additions & 354 deletions rasa/cdu/dialogue_stack.py

This file was deleted.

7 changes: 2 additions & 5 deletions rasa/cdu/generator/llm_command_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from jinja2 import Template
import structlog
from rasa.cdu.stack.utils import top_flow_frame
from rasa.cdu.generator.base import CommandGenerator
from rasa.cdu.commands import (
Command,
Expand All @@ -16,8 +17,6 @@
KnowledgeAnswerCommand,
ClarifyCommand,
)
from rasa.cdu.conversation_patterns import FLOW_PATTERN_COLLECT_INFORMATION

from rasa.core.policies.flow_policy import DialogueStack
from rasa.engine.graph import GraphComponent, ExecutionContext
from rasa.engine.recipes.default_recipe import DefaultV1Recipe
Expand Down Expand Up @@ -338,9 +337,7 @@ def render_template(
flows_without_patterns = FlowsList(
[f for f in flows.underlying_flows if not f.is_handling_pattern()]
)
top_relevant_frame = DialogueStack.top_frame_on_tracker(
tracker, ignore_frame=FLOW_PATTERN_COLLECT_INFORMATION
)
top_relevant_frame = top_flow_frame(DialogueStack.from_tracker(tracker))
top_flow = top_relevant_frame.flow(flows) if top_relevant_frame else None
current_step = top_relevant_frame.step(flows) if top_relevant_frame else None
if top_flow is not None:
Expand Down

0 comments on commit a3391d6

Please sign in to comment.