Skip to content

Commit 0ddb5e0

Browse files
authored
Merge pull request RasaHQ#4738 from RasaHQ/1.4.x-merge
merge 1.4.x into master
2 parents 5c6a6e9 + 28114bd commit 0ddb5e0

File tree

145 files changed

+758
-693
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+758
-693
lines changed

CHANGELOG.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ Fixed
3434
- Fixed rasa init showing traceback error when user does Keyboard Interrupt before choosing a project path
3535
- ``CountVectorsFeaturizer`` featurizes intents only if its analyzer is set to ``word``
3636

37+
[1.4.3] - 2019-10-29
38+
^^^^^^^^^^^^^^^^^^^^
39+
40+
Fixed
41+
-----
42+
- Fixed ``Connection reset by peer`` errors and bot response delays when using the
43+
RabbitMQ event broker.
44+
3745
[1.4.2] - 2019-10-28
3846
^^^^^^^^^^^^^^^^^^^^
3947

@@ -46,6 +54,8 @@ Fixed
4654
- Fixed ``'Namespace' object has no attribute 'persist_nlu_data'`` error during
4755
interactive learning
4856
- Pinned `networkx~=2.3.0` to fix visualization in `rasa interactive` and Rasa X
57+
- Fixed ``No model found`` error when using ``rasa run actions`` with "actions"
58+
as a directory.
4959

5060
[1.4.1] - 2019-10-22
5161
^^^^^^^^^^^^^^^^^^^^
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
## synonym:10:00
2+
- 10:00 am

docs/conf.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
#
32
# -- General configuration ------------------------------------------------
43
import re
@@ -324,9 +323,7 @@
324323

325324
# extlinks configuration
326325

327-
extlinks = {
328-
"gh-code": ("https://github.com/RasaHQ/rasa/tree/{}/%s".format(release), "github ")
329-
}
326+
extlinks = {"gh-code": (f"https://github.com/RasaHQ/rasa/tree/{release}/%s", "github ")}
330327

331328
# Sphinxcontrib configuration
332329
scv_priority = "tags"
@@ -340,9 +337,9 @@
340337
re.compile(r"^[2-9]+\.\d+\.\d+$"),
341338
re.compile(r"^1\.[456789]+\.\d+$"),
342339
re.compile(r"^1\.3\.\d+$"),
343-
re.compile("^1\.2\.9$"),
344-
re.compile("^1\.1\.8$"),
345-
re.compile("^1\.0\.9$"),
340+
re.compile(r"^1\.2\.9$"),
341+
re.compile(r"^1\.1\.8$"),
342+
re.compile(r"^1\.0\.9$"),
346343
)
347344
scv_greatest_tag = True
348345

docs/core/actions.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ The only thing your action server needs to install is ``rasa-sdk``:
104104
separate container, you only need to install ``rasa-sdk``.
105105

106106
The file that contains your custom actions should be called ``actions.py``.
107+
Alternatively, you can use a package directory called ``actions`` or else
108+
manually specify an actions module or package with the ``--actions`` flag.
107109

108110
If you have ``rasa`` installed, run this command to start your action server:
109111

docs/user-guide/connectors/mattermost.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ Getting Credentials
2424
that is said.
2525
4. Make sure **trigger when** is set to value
2626
**first word matches a trigger word exactly**.
27-
5. The callback url needs to be your ngrok url where you
27+
5. The callback url needs to be either your localhost address for Rasa, or your ngrok url where you
2828
have your webhook running in Core or your public address, e.g.
29-
``http://test.example.com/webhooks/mattermost/webhook``.
29+
``http://test.example.com/webhooks/mattermost/webhook`` or ``http://localhost:5005/webhooks/mattermost/webhook``.
3030

3131

3232
For more detailed steps, visit the
@@ -49,7 +49,7 @@ you need to supply a ``credentials.yml`` with the following content:
4949
mattermost:
5050
url: "https://chat.example.com/api/v4"
5151
team: "community"
52-
52+
user: "[email protected]" # actual username of your bot user, not displayname
5353
pw: "password"
5454
webhook_url: "https://server.example.com/webhooks/mattermost/webhook"
5555

examples/concertbot/actions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def run(self, dispatcher, tracker, domain):
1212
{"artist": "Katy Perry", "reviews": 5.0},
1313
]
1414
description = ", ".join([c["artist"] for c in concerts])
15-
dispatcher.utter_message("{}".format(description))
15+
dispatcher.utter_message(f"{description}")
1616
return [SlotSet("concerts", concerts)]
1717

1818

@@ -27,7 +27,7 @@ def run(self, dispatcher, tracker, domain):
2727
]
2828
dispatcher.utter_message("here are some venues I found")
2929
description = ", ".join([c["name"] for c in venues])
30-
dispatcher.utter_message("{}".format(description))
30+
dispatcher.utter_message(f"{description}")
3131
return [SlotSet("venues", venues)]
3232

3333

@@ -37,7 +37,7 @@ def name(self):
3737

3838
def run(self, dispatcher, tracker, domain):
3939
concerts = tracker.get_slot("concerts")
40-
dispatcher.utter_message("concerts from slots: {}".format(concerts))
40+
dispatcher.utter_message(f"concerts from slots: {concerts}")
4141
return []
4242

4343

@@ -47,5 +47,5 @@ def name(self):
4747

4848
def run(self, dispatcher, tracker, domain):
4949
venues = tracker.get_slot("venues")
50-
dispatcher.utter_message("venues from slots: {}".format(venues))
50+
dispatcher.utter_message(f"venues from slots: {venues}")
5151
return []

examples/formbot/actions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
from typing import Dict, Text, Any, List, Union, Optional
32

43
from rasa_sdk import Tracker

examples/restaurantbot/actions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from rasa_sdk.events import SlotSet
33

44

5-
class RestaurantAPI(object):
5+
class RestaurantAPI:
66
def search(self, info):
77
return "papi's pizza place"
88

examples/restaurantbot/run.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ async def parse(text: Text, model_path: Text):
1919

2020
response = await agent.handle_text(text)
2121

22-
logger.info("Text: '{}'".format(text))
22+
logger.info(f"Text: '{text}'")
2323
logger.info("Response:")
2424
logger.info(response)
2525

@@ -49,7 +49,7 @@ async def train_core(
4949
model_path = os.path.join(model_directory, model_name, "core")
5050
agent.persist(model_path)
5151

52-
logger.info("Model trained. Stored in '{}'.".format(model_path))
52+
logger.info(f"Model trained. Stored in '{model_path}'.")
5353

5454
return model_path
5555

@@ -73,7 +73,7 @@ def train_nlu(
7373
model_path = os.path.join(model_directory, model_name)
7474
model_directory = trainer.persist(model_path, fixed_model_name="nlu")
7575

76-
logger.info("Model trained. Stored in '{}'.".format(model_directory))
76+
logger.info(f"Model trained. Stored in '{model_directory}'.")
7777

7878
return model_directory
7979

rasa/cli/arguments/default_arguments.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def add_stories_param(
3636
"--stories",
3737
type=str,
3838
default=DEFAULT_DATA_PATH,
39-
help="File or folder containing your {} stories.".format(stories_name),
39+
help=f"File or folder containing your {stories_name} stories.",
4040
)
4141

4242

@@ -100,7 +100,7 @@ def add_data_param(
100100
"--data",
101101
type=str,
102102
default=default,
103-
help="Path to the file or directory containing {} data.".format(data_type),
103+
help=f"Path to the file or directory containing {data_type} data.",
104104
required=required,
105105
)
106106

0 commit comments

Comments
 (0)