Skip to content

Commit

Permalink
Moved flow steps, step sequence and step links out of the main flow file
Browse files Browse the repository at this point in the history
  • Loading branch information
twerkmeister committed Oct 25, 2023
1 parent 27d69fd commit d2c428d
Show file tree
Hide file tree
Showing 17 changed files with 1,040 additions and 1,030 deletions.
2 changes: 1 addition & 1 deletion rasa/core/actions/action_clean_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from rasa.shared.core.constants import ACTION_CLEAN_STACK, DIALOGUE_STACK_SLOT
from rasa.shared.core.domain import Domain
from rasa.shared.core.events import Event, SlotSet
from rasa.shared.core.flows.flow import ContinueFlowStep, END_STEP
from rasa.shared.core.flows.flow_step import ContinueFlowStep, END_STEP
from rasa.shared.core.trackers import DialogueStateTracker


Expand Down
6 changes: 3 additions & 3 deletions rasa/core/policies/flow_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,12 @@
ACTION_SEND_TEXT_NAME,
)
from rasa.shared.core.events import Event, SlotSet
from rasa.shared.core.flows.flow import (
from rasa.shared.core.flows.flow_step import (
END_STEP,
ActionFlowStep,
BranchFlowStep,
ContinueFlowStep,
ElseFlowLink,
Flow,
FlowStep,
GenerateResponseFlowStep,
IfFlowLink,
Expand All @@ -62,8 +61,9 @@
CollectInformationFlowStep,
StaticFlowLink,
)
from rasa.shared.core.flows.flow import Flow
from rasa.shared.core.flows.flows_list import FlowsList
from rasa.shared.core.flows.flow import EndFlowStep
from rasa.shared.core.flows.flow_step import EndFlowStep
from rasa.core.featurizers.tracker_featurizers import TrackerFeaturizer
from rasa.core.policies.policy import Policy, PolicyPrediction
from rasa.engine.graph import ExecutionContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
UserFlowStackFrame,
)
from rasa.shared.core.events import Event
from rasa.shared.core.flows.flow import END_STEP, ContinueFlowStep, FlowStep
from rasa.shared.core.flows.flow_step import END_STEP, ContinueFlowStep, FlowStep
from rasa.shared.core.flows.flows_list import FlowsList
from rasa.shared.core.trackers import DialogueStateTracker
import rasa.dialogue_understanding.stack.utils as utils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
from rasa.engine.recipes.default_recipe import DefaultV1Recipe
from rasa.engine.storage.resource import Resource
from rasa.engine.storage.storage import ModelStorage
from rasa.shared.core.flows.flow import (
Flow,
from rasa.shared.core.flows.flow_step import (
FlowStep,
CollectInformationFlowStep,
)
from rasa.shared.core.flows.flow import Flow
from rasa.shared.core.flows.flows_list import FlowsList
from rasa.shared.core.trackers import DialogueStateTracker
from rasa.shared.core.slots import (
Expand Down
2 changes: 1 addition & 1 deletion rasa/dialogue_understanding/patterns/cancel.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from rasa.shared.core.constants import ACTION_CANCEL_FLOW
from rasa.shared.core.domain import Domain
from rasa.shared.core.events import Event
from rasa.shared.core.flows.flow import END_STEP, ContinueFlowStep
from rasa.shared.core.flows.flow_step import END_STEP, ContinueFlowStep
from rasa.shared.core.trackers import DialogueStateTracker


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from rasa.dialogue_understanding.stack.dialogue_stack import DialogueStackFrame
from rasa.shared.constants import RASA_DEFAULT_FLOW_PATTERN_PREFIX
from rasa.dialogue_understanding.stack.frames import PatternFlowStackFrame
from rasa.shared.core.flows.flow import SlotRejection
from rasa.shared.core.flows.flow_step import SlotRejection

FLOW_PATTERN_COLLECT_INFORMATION = (
RASA_DEFAULT_FLOW_PATTERN_PREFIX + "collect_information"
Expand Down
4 changes: 2 additions & 2 deletions rasa/dialogue_understanding/patterns/correction.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
)
from rasa.dialogue_understanding.stack.dialogue_stack import DialogueStack
from rasa.shared.constants import RASA_DEFAULT_FLOW_PATTERN_PREFIX
from rasa.shared.core.flows.flow import (
from rasa.shared.core.flows.flow_step import (
START_STEP,
)
from rasa.shared.core.trackers import (
Expand All @@ -30,7 +30,7 @@
SlotSet,
)
from rasa.core.nlg import NaturalLanguageGenerator
from rasa.shared.core.flows.flow import END_STEP, ContinueFlowStep
from rasa.shared.core.flows.flow_step import END_STEP, ContinueFlowStep

structlogger = structlog.get_logger()

Expand Down
2 changes: 1 addition & 1 deletion rasa/dialogue_understanding/processor/command_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
)
from rasa.shared.core.constants import FLOW_HASHES_SLOT
from rasa.shared.core.events import Event, SlotSet
from rasa.shared.core.flows.flow import (
from rasa.shared.core.flows.flow_step import (
CollectInformationFlowStep,
)
from rasa.shared.core.flows.flows_list import FlowsList
Expand Down
3 changes: 2 additions & 1 deletion rasa/dialogue_understanding/stack/frames/flow_stack_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
from typing import Any, Dict, Optional

from rasa.dialogue_understanding.stack.frames import DialogueStackFrame
from rasa.shared.core.flows.flow import START_STEP, Flow, FlowStep
from rasa.shared.core.flows.flow_step import START_STEP, FlowStep
from rasa.shared.core.flows.flow import Flow
from rasa.shared.core.flows.flows_list import FlowsList
from rasa.shared.exceptions import RasaException

Expand Down
2 changes: 1 addition & 1 deletion rasa/dialogue_understanding/stack/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from rasa.dialogue_understanding.stack.frames import BaseFlowStackFrame
from rasa.dialogue_understanding.stack.dialogue_stack import DialogueStack
from rasa.dialogue_understanding.stack.frames import UserFlowStackFrame
from rasa.shared.core.flows.flow import END_STEP, ContinueFlowStep
from rasa.shared.core.flows.flow_step import END_STEP, ContinueFlowStep
from rasa.shared.core.flows.flows_list import FlowsList


Expand Down
Loading

0 comments on commit d2c428d

Please sign in to comment.