Skip to content

Commit

Permalink
Merge pull request #343 from RasaHQ/prepare-release-2.1.0
Browse files Browse the repository at this point in the history
prepared release of version 2.1.0
  • Loading branch information
wochinge authored Nov 17, 2020
2 parents a4eac21 + 87e4d39 commit 1807800
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 41 deletions.
47 changes: 47 additions & 0 deletions CHANGELOG.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,53 @@ https://github.com/RasaHQ/rasa/tree/master/changelog/ . -->

<!-- TOWNCRIER -->

## [2.1.0] - 2020-11-17


### Features
- [#329](https://github.com/rasahq/rasa/issues/329): Extend `FormValidationAction` with support for extracting slots. If you
want to extract an additional slot, add the slot's name to the list of `required_slots`
and add a method `extract_<slot name>` to your action:

```python
from typing import Text, Dict, Any, List, Optional

from rasa_sdk.forms import (
FormValidationAction,
)

class FormWithSlotExtractions(FormValidationAction):
def name(self) -> Text:
return "some_form"

async def required_slots(
self,
slots_mapped_in_domain: List[Text],
dispatcher: "CollectingDispatcher",
tracker: "Tracker",
domain: "DomainDict",
) -> Optional[List[Text]]:
return slots_mapped_in_domain + ["my_slot"]

async def extract_my_slot(
self,
dispatcher: "CollectingDispatcher",
tracker: "Tracker",
domain: "DomainDict",
) -> Dict[Text, Any]:
return {"my_slot": "some value"}
```

If all slots returned by `required_slots` are filled,
the action will automatically return an event to disable the form.
If not all required slots are filled, the SDK will return an event
to Rasa Open Source to fill the first missing slot next.

### Improvements
- [#7078](https://github.com/rasahq/rasa/issues/7078): Adds the method `get_intent_of_latest_message` to the `Tracker` allowing easier
access to the user's latest intent in case of an `nlu_fallback`.


## [2.0.0] - 2020-10-07


Expand Down
37 changes: 0 additions & 37 deletions changelog/329.feature.md

This file was deleted.

2 changes: 0 additions & 2 deletions changelog/7078.improvement.md

This file was deleted.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exclude = "((.eggs | .git | .mypy_cache | .pytest_cache | build | dist))"

[tool.poetry]
name = "rasa-sdk"
version = "2.0.0"
version = "2.1.0"
description = "Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants"
authors = [ "Rasa Technologies GmbH <[email protected]>",]
maintainers = [ "Tom Bocklisch <[email protected]>",]
Expand Down
2 changes: 1 addition & 1 deletion rasa_sdk/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# this file will automatically be changed,
# do not add anything but the version number here!
__version__ = "2.0.0"
__version__ = "2.1.0"

0 comments on commit 1807800

Please sign in to comment.