Skip to content

Commit

Permalink
renamed cdu -> dialogue understanding
Browse files Browse the repository at this point in the history
  • Loading branch information
tmbo committed Sep 18, 2023
1 parent c0870ae commit 2bfcb05
Show file tree
Hide file tree
Showing 74 changed files with 218 additions and 171 deletions.
2 changes: 1 addition & 1 deletion data/graph_schemas/default_config_core_predict_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ nodes:
needs:
tracker: __tracker__
flows: flows_provider
uses: rasa.cdu.processor.command_processor_component.CommandProcessorComponent
uses: rasa.dialogue_understanding.processor.command_processor_component.CommandProcessorComponent
constructor_name: load
fn: execute_commands
config: { }
Expand Down
2 changes: 1 addition & 1 deletion data/graph_schemas/default_config_e2e_predict_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ nodes:
needs:
tracker: __tracker__
flows: flows_provider
uses: rasa.cdu.processor.command_processor_component.CommandProcessorComponent
uses: rasa.dialogue_understanding.processor.command_processor_component.CommandProcessorComponent
constructor_name: load
fn: execute_commands
config: { }
Expand Down
2 changes: 1 addition & 1 deletion data/graph_schemas/default_config_predict_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ nodes:
needs:
tracker: __tracker__
flows: flows_provider
uses: rasa.cdu.processor.command_processor_component.CommandProcessorComponent
uses: rasa.dialogue_understanding.processor.command_processor_component.CommandProcessorComponent
constructor_name: load
fn: execute_commands
config: { }
Expand Down
2 changes: 1 addition & 1 deletion data/graph_schemas/max_hist_config_predict_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ nodes:
needs:
tracker: __tracker__
flows: flows_provider
uses: rasa.cdu.processor.command_processor_component.CommandProcessorComponent
uses: rasa.dialogue_understanding.processor.command_processor_component.CommandProcessorComponent
constructor_name: load
fn: execute_commands
config: { }
Expand Down
2 changes: 1 addition & 1 deletion data/test_config/graph_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ predict_schema:
needs:
tracker: __tracker__
flows: flows_provider
uses: rasa.cdu.processor.command_processor_component.CommandProcessorComponent
uses: rasa.dialogue_understanding.processor.command_processor_component.CommandProcessorComponent
constructor_name: load
fn: execute_commands
config: { }
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repository = "https://github.com/rasahq/rasa"
documentation = "https://rasa.com/docs"
classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Topic :: Software Development :: Libraries",]
keywords = [ "nlp", "machine-learning", "machine-learning-library", "bot", "bots", "botkit", "rasa conversational-agents", "conversational-ai", "chatbot", "chatbot-framework", "bot-framework",]
include = [ "LICENSE.txt", "README.md", "rasa/shared/core/training_data/visualization.html", "rasa/cli/default_config.yml", "rasa/shared/importers/*", "rasa/utils/schemas/*", "rasa/keys", "rasa/core/channels/chat.html", "rasa/cdu/classifiers/command_prompt_template.jinja2",]
include = [ "LICENSE.txt", "README.md", "rasa/shared/core/training_data/visualization.html", "rasa/cli/default_config.yml", "rasa/shared/importers/*", "rasa/utils/schemas/*", "rasa/keys", "rasa/core/channels/chat.html", "rasa/dialogue_understanding/classifiers/command_prompt_template.jinja2",]
readme = "README.md"
[[tool.poetry.source]]
name = "internal repository mirroring psycopg binary for macos"
Expand Down
29 changes: 0 additions & 29 deletions rasa/cdu/commands/__init__.py

This file was deleted.

4 changes: 0 additions & 4 deletions rasa/cdu/generator/__init__.py

This file was deleted.

17 changes: 0 additions & 17 deletions rasa/cdu/stack/frames/__init__.py

This file was deleted.

6 changes: 3 additions & 3 deletions rasa/core/actions/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@
def default_actions(action_endpoint: Optional[EndpointConfig] = None) -> List["Action"]:
"""List default actions."""
from rasa.core.actions.two_stage_fallback import TwoStageFallbackAction
from rasa.cdu.patterns.correction import ActionCorrectFlowSlot
from rasa.cdu.patterns.cancel import ActionCancelFlow
from rasa.cdu.patterns.clarify import ActionClarifyFlows
from rasa.dialogue_understanding.patterns.correction import ActionCorrectFlowSlot
from rasa.dialogue_understanding.patterns.cancel import ActionCancelFlow
from rasa.dialogue_understanding.patterns.clarify import ActionClarifyFlows

return [
ActionListen(),
Expand Down
4 changes: 2 additions & 2 deletions rasa/core/actions/flow_trigger_action.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from typing import Any, Dict, Optional, Text, List

import structlog
from rasa.cdu.stack.dialogue_stack import DialogueStack
from rasa.cdu.stack.frames.flow_stack_frame import (
from rasa.dialogue_understanding.stack.dialogue_stack import DialogueStack
from rasa.dialogue_understanding.stack.frames.flow_stack_frame import (
FlowStackFrameType,
UserFlowStackFrame,
)
Expand Down
2 changes: 1 addition & 1 deletion rasa/core/nlg/response.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import copy
import logging
from rasa.cdu.stack.dialogue_stack import DialogueStack
from rasa.dialogue_understanding.stack.dialogue_stack import DialogueStack
from rasa.core.constants import DEFAULT_TEMPLATE_ENGINE, TEMPLATE_ENGINE_CONFIG_KEY

from rasa.shared.core.trackers import DialogueStateTracker
Expand Down
18 changes: 10 additions & 8 deletions rasa/core/policies/flow_policy.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
from __future__ import annotations

from dataclasses import dataclass
from typing import Any, Dict, Text, List, Optional, Union
from typing import Any, Dict, Text, List, Optional

from jinja2 import Template
from structlog.contextvars import (
bound_contextvars,
)
from rasa.cdu.stack.dialogue_stack import DialogueStack
from rasa.cdu.stack.frames import (
from rasa.dialogue_understanding.stack.dialogue_stack import DialogueStack
from rasa.dialogue_understanding.stack.frames import (
BaseFlowStackFrame,
DialogueStackFrame,
UserFlowStackFrame,
)
from rasa.cdu.patterns.collect_information import (
from rasa.dialogue_understanding.patterns.collect_information import (
CollectInformationPatternFlowStackFrame,
)
from rasa.cdu.patterns.completed import CompletedPatternFlowStackFrame
from rasa.cdu.patterns.continue_interrupted import (
from rasa.dialogue_understanding.patterns.completed import (
CompletedPatternFlowStackFrame,
)
from rasa.dialogue_understanding.patterns.continue_interrupted import (
ContinueInterruptedPatternFlowStackFrame,
)
from rasa.cdu.stack.frames.flow_stack_frame import FlowStackFrameType
from rasa.cdu.stack.utils import top_user_flow_frame
from rasa.dialogue_understanding.stack.frames.flow_stack_frame import FlowStackFrameType
from rasa.dialogue_understanding.stack.utils import top_user_flow_frame

from rasa.core.constants import (
DEFAULT_POLICY_PRIORITY,
Expand Down
2 changes: 1 addition & 1 deletion rasa/core/policies/policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import logging
from enum import Enum
from pathlib import Path
from rasa.cdu.stack.dialogue_stack import (
from rasa.dialogue_understanding.stack.dialogue_stack import (
DialogueStack,
DialogueStackFrame,
)
Expand Down
File renamed without changes.
42 changes: 42 additions & 0 deletions rasa/dialogue_understanding/commands/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
from rasa.dialogue_understanding.commands.command import Command
from rasa.dialogue_understanding.commands.free_form_answer_command import (
FreeFormAnswerCommand,
)
from rasa.dialogue_understanding.commands.cancel_flow_command import CancelFlowCommand
from rasa.dialogue_understanding.commands.knowledge_answer_command import (
KnowledgeAnswerCommand,
)
from rasa.dialogue_understanding.commands.chit_chat_answer_command import (
ChitChatAnswerCommand,
)
from rasa.dialogue_understanding.commands.can_not_handle_command import (
CannotHandleCommand,
)
from rasa.dialogue_understanding.commands.clarify_command import ClarifyCommand
from rasa.dialogue_understanding.commands.error_command import ErrorCommand
from rasa.dialogue_understanding.commands.set_slot_command import SetSlotCommand
from rasa.dialogue_understanding.commands.start_flow_command import StartFlowCommand
from rasa.dialogue_understanding.commands.human_handoff_command import (
HumanHandoffCommand,
)
from rasa.dialogue_understanding.commands.correct_slots_command import (
CorrectSlotsCommand,
CorrectedSlot,
)


__all__ = [
"Command",
"FreeFormAnswerCommand",
"CancelFlowCommand",
"KnowledgeAnswerCommand",
"ChitChatAnswerCommand",
"CannotHandleCommand",
"ClarifyCommand",
"ErrorCommand",
"SetSlotCommand",
"StartFlowCommand",
"HumanHandoffCommand",
"CorrectSlotsCommand",
"CorrectedSlot",
]
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from dataclasses import dataclass
from typing import Any, Dict, List
from rasa.cdu.commands import Command
from rasa.dialogue_understanding.commands import Command
from rasa.shared.core.events import Event
from rasa.shared.core.flows.flow import FlowsList
from rasa.shared.core.trackers import DialogueStateTracker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

import structlog

from rasa.cdu.commands import Command
from rasa.cdu.patterns.cancel import CancelPatternFlowStackFrame
from rasa.cdu.stack.dialogue_stack import DialogueStack
from rasa.cdu.stack.frames import UserFlowStackFrame
from rasa.dialogue_understanding.commands import Command
from rasa.dialogue_understanding.patterns.cancel import CancelPatternFlowStackFrame
from rasa.dialogue_understanding.stack.dialogue_stack import DialogueStack
from rasa.dialogue_understanding.stack.frames import UserFlowStackFrame
from rasa.shared.core.constants import DIALOGUE_STACK_SLOT
from rasa.shared.core.events import Event, SlotSet
from rasa.shared.core.flows.flow import FlowsList
from rasa.shared.core.trackers import DialogueStateTracker
from rasa.cdu.stack.utils import top_user_flow_frame
from rasa.dialogue_understanding.stack.utils import top_user_flow_frame

structlogger = structlog.get_logger()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

from dataclasses import dataclass
from typing import Any, Dict, List
from rasa.cdu.commands import FreeFormAnswerCommand
from rasa.cdu.stack.dialogue_stack import DialogueStack
from rasa.cdu.stack.frames.chit_chat_frame import ChitChatStackFrame
from rasa.dialogue_understanding.commands import FreeFormAnswerCommand
from rasa.dialogue_understanding.stack.dialogue_stack import DialogueStack
from rasa.dialogue_understanding.stack.frames.chit_chat_frame import ChitChatStackFrame
from rasa.shared.core.constants import DIALOGUE_STACK_SLOT
from rasa.shared.core.events import Event, SlotSet
from rasa.shared.core.flows.flow import FlowsList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
from typing import Any, Dict, List

import structlog
from rasa.cdu.commands import Command
from rasa.cdu.patterns.clarify import ClarifyPatternFlowStackFrame
from rasa.cdu.stack.dialogue_stack import DialogueStack
from rasa.dialogue_understanding.commands import Command
from rasa.dialogue_understanding.patterns.clarify import ClarifyPatternFlowStackFrame
from rasa.dialogue_understanding.stack.dialogue_stack import DialogueStack
from rasa.shared.core.constants import DIALOGUE_STACK_SLOT
from rasa.shared.core.events import Event, SlotSet
from rasa.shared.core.flows.flow import FlowsList
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@

import structlog

from rasa.cdu.commands import Command
from rasa.cdu.patterns.correction import (
from rasa.dialogue_understanding.commands import Command
from rasa.dialogue_understanding.patterns.correction import (
FLOW_PATTERN_CORRECTION_ID,
CorrectionPatternFlowStackFrame,
)
from rasa.cdu.stack.dialogue_stack import DialogueStack
from rasa.cdu.stack.frames.flow_stack_frame import (
from rasa.dialogue_understanding.stack.dialogue_stack import DialogueStack
from rasa.dialogue_understanding.stack.frames.flow_stack_frame import (
BaseFlowStackFrame,
UserFlowStackFrame,
)
from rasa.shared.core.constants import DIALOGUE_STACK_SLOT
from rasa.shared.core.events import Event, SlotSet
from rasa.shared.core.flows.flow import END_STEP, ContinueFlowStep, FlowStep, FlowsList
from rasa.shared.core.trackers import DialogueStateTracker
import rasa.cdu.stack.utils as utils
import rasa.dialogue_understanding.stack.utils as utils

structlogger = structlog.get_logger()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
from typing import Any, Dict, List

import structlog
from rasa.cdu.commands import Command
from rasa.cdu.patterns.internal_error import InternalErrorPatternFlowStackFrame
from rasa.cdu.stack.dialogue_stack import DialogueStack
from rasa.dialogue_understanding.commands import Command
from rasa.dialogue_understanding.patterns.internal_error import (
InternalErrorPatternFlowStackFrame,
)
from rasa.dialogue_understanding.stack.dialogue_stack import DialogueStack
from rasa.shared.core.constants import DIALOGUE_STACK_SLOT
from rasa.shared.core.events import Event, SlotSet
from rasa.shared.core.flows.flow import FlowsList
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from dataclasses import dataclass
from rasa.cdu.commands import Command
from rasa.dialogue_understanding.commands import Command


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from dataclasses import dataclass
from typing import Any, Dict, List
from rasa.cdu.commands import Command
from rasa.dialogue_understanding.commands import Command
from rasa.shared.core.events import Event
from rasa.shared.core.flows.flow import FlowsList
from rasa.shared.core.trackers import DialogueStateTracker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

from dataclasses import dataclass
from typing import Any, Dict, List
from rasa.cdu.commands import FreeFormAnswerCommand
from rasa.cdu.stack.dialogue_stack import DialogueStack
from rasa.cdu.stack.frames.search_frame import SearchStackFrame
from rasa.dialogue_understanding.commands import FreeFormAnswerCommand
from rasa.dialogue_understanding.stack.dialogue_stack import DialogueStack
from rasa.dialogue_understanding.stack.frames.search_frame import SearchStackFrame
from rasa.shared.core.constants import DIALOGUE_STACK_SLOT
from rasa.shared.core.events import Event, SlotSet
from rasa.shared.core.flows.flow import FlowsList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
from typing import Any, Dict, List

import structlog
from rasa.cdu.commands import Command
from rasa.cdu.stack.dialogue_stack import DialogueStack
from rasa.cdu.stack.utils import filled_slots_for_active_flow
from rasa.dialogue_understanding.commands import Command
from rasa.dialogue_understanding.stack.dialogue_stack import DialogueStack
from rasa.dialogue_understanding.stack.utils import filled_slots_for_active_flow
from rasa.shared.core.events import Event, SlotSet
from rasa.shared.core.flows.flow import FlowsList
from rasa.shared.core.trackers import DialogueStateTracker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
from typing import Any, Dict, List

import structlog
from rasa.cdu.commands import Command
from rasa.cdu.stack.dialogue_stack import DialogueStack
from rasa.cdu.stack.frames.flow_stack_frame import (
from rasa.dialogue_understanding.commands import Command
from rasa.dialogue_understanding.stack.dialogue_stack import DialogueStack
from rasa.dialogue_understanding.stack.frames.flow_stack_frame import (
FlowStackFrameType,
UserFlowStackFrame,
)
from rasa.cdu.stack.utils import top_user_flow_frame, user_flows_on_the_stack
from rasa.dialogue_understanding.stack.utils import (
top_user_flow_frame,
user_flows_on_the_stack,
)
from rasa.shared.core.constants import DIALOGUE_STACK_SLOT
from rasa.shared.core.events import Event, SlotSet
from rasa.shared.core.flows.flow import FlowsList
Expand Down
6 changes: 6 additions & 0 deletions rasa/dialogue_understanding/generator/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from rasa.dialogue_understanding.generator.command_generator import CommandGenerator
from rasa.dialogue_understanding.generator.llm_command_generator import (
LLMCommandGenerator,
)

__all__ = ["CommandGenerator", "LLMCommandGenerator"]
Loading

0 comments on commit 2bfcb05

Please sign in to comment.