Skip to content
This repository was archived by the owner on Apr 28, 2021. It is now read-only.

Commit 840899f

Browse files
author
Nathan Zylbersztejn
authored
Merge pull request #9 from botfront/feat/bf_actions
feat(actions): import actions from addons
2 parents f6c9ca0 + 46131bf commit 840899f

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
rasa-addons==0.6.3
1+
rasa-addons==0.7.0
22
jieba==0.39
33
python-socketio==4.3.0
44
python-engineio==3.9.3

docker/Dockerfile_botfront

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ EXPOSE 5005
5151

5252
ENTRYPOINT ["rasa"]
5353

54-
CMD ["--help"]
54+
CMD ["run", "--enable-api", "--debug"]

rasa/core/actions/action.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ def default_actions() -> List["Action"]:
6666

6767
def default_action_names() -> List[Text]:
6868
"""List default action names."""
69-
return [a.name() for a in default_actions()]
69+
# bf mod
70+
return [a.name() for a in default_actions()] + list(actions_bf.keys())
71+
# /bf mod
7072

7173

7274
def combine_user_with_default_actions(user_actions):
@@ -92,6 +94,9 @@ def action_from_name(
9294
return defaults[name]
9395
elif name.startswith(UTTER_PREFIX):
9496
return ActionUtterTemplate(name)
97+
# bf mod
98+
elif name in actions_bf: return actions_bf[name]
99+
# /bf mod
95100
else:
96101
return RemoteAction(name, action_endpoint)
97102

@@ -370,6 +375,7 @@ async def _utter_responses(
370375
responses += [resolved]
371376
else:
372377
responses += [response]
378+
# /bf mod
373379

374380
for response in responses:
375381
if "template" in response:
@@ -378,6 +384,7 @@ async def _utter_responses(
378384
draft = await nlg.generate(
379385
# bf: added language kwarg
380386
response["template"], tracker, output_channel.name(), **kwargs, language=output_channel.language
387+
# /bf mod
381388
)
382389
if not draft:
383390
continue
@@ -604,3 +611,7 @@ def __init__(self):
604611
super(ActionDefaultAskRephrase, self).__init__(
605612
"utter_ask_rephrase", silent_fail=True
606613
)
614+
615+
# bf mod
616+
from rasa_addons.core.actions import actions_bf
617+
# /bf mod

rasa/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
__version__ = "1.1.7"
2-
__bf_patch__ = "-bf.3"
2+
__bf_patch__ = "-bf.5"

0 commit comments

Comments
 (0)