Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slot mappings #549

Merged
merged 40 commits into from
Oct 14, 2021
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
e24b179
`FormAction` adapted to Rasa changes
alwx Sep 29, 2021
1a1df8c
Small fixes for tests
alwx Sep 29, 2021
6a6d486
Code style fixes
alwx Sep 29, 2021
c58d1fc
Returning tests back
alwx Sep 29, 2021
0a4dbde
Code style fixes
alwx Sep 29, 2021
c6964a8
Test fixes
alwx Sep 29, 2021
bfde123
Updates + fixes for tests
alwx Sep 30, 2021
850c750
More updates for tests
alwx Sep 30, 2021
f6df068
More test fixes
alwx Oct 1, 2021
4290349
All the tests for `FormAction` got updates
alwx Oct 1, 2021
bbb9397
Updated tests and `slots.py` file
alwx Oct 4, 2021
64b6a1a
`test_validate_trigger_slots`
alwx Oct 4, 2021
5d89ed3
Changelog entry
alwx Oct 4, 2021
a0cc6fb
More fixes for slots
alwx Oct 7, 2021
8148223
Updates for slot extraction
alwx Oct 7, 2021
bc22082
Code style fixes
alwx Oct 7, 2021
1ca565f
Updated test
alwx Oct 7, 2021
e7ac2c6
Some more fixes
alwx Oct 7, 2021
620a926
Updated validation
alwx Oct 7, 2021
a04d7a2
Updates for domain_slots function
alwx Oct 10, 2021
4e266d3
Updates for slots
alwx Oct 10, 2021
693d106
Test change
alwx Oct 10, 2021
85df522
Test fix
alwx Oct 10, 2021
b9a0b7c
More fixes
alwx Oct 10, 2021
bf01cac
Code style fixes
alwx Oct 10, 2021
d2726ca
Code style fixes
alwx Oct 11, 2021
14b87b1
Small text fixes
alwx Oct 11, 2021
11dc5e4
Updates for forms and validation actions
alwx Oct 12, 2021
50ede0c
Code style fixes
alwx Oct 12, 2021
53c0333
Updating the changelog
alwx Oct 12, 2021
fccc2d4
Types fixes
alwx Oct 12, 2021
986464d
Test updates
alwx Oct 12, 2021
9a60dc5
test_extract_and_validate_global_slot
alwx Oct 12, 2021
2ec17ab
Updated tests
alwx Oct 13, 2021
610894a
Test fixes
alwx Oct 13, 2021
1b21f40
Removed print
alwx Oct 13, 2021
faa203f
Code style update
alwx Oct 13, 2021
55b46d5
Updates for tests
alwx Oct 14, 2021
1daa3f4
Removed `FormAction`
alwx Oct 14, 2021
fcf905e
Lint fixes
alwx Oct 14, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions CHANGELOG.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,14 @@ https://github.com/RasaHQ/rasa/tree/main/changelog/ . -->
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
```python
from typing import Text, Dict, Any, List, Optional

from rasa_sdk.forms import (
FormValidationAction,
ValidationAction,
)

class FormWithSlotExtractions(FormValidationAction):
class FormWithSlotExtractions(ValidationAction):
alwx marked this conversation as resolved.
Show resolved Hide resolved
def name(self) -> Text:
return "some_form"

Expand Down Expand Up @@ -231,13 +231,13 @@ https://github.com/RasaHQ/rasa/tree/main/changelog/ . -->

Example:

```python
```python
from typing import Text, Any, Dict
from rasa_sdk import FormValidationAction, Tracker
from rasa_sdk import ValidationAction, Tracker
from rasa_sdk.types import DomainDict
from rasa_sdk.executor import CollectingDispatcher

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

Expand Down
1 change: 1 addition & 0 deletions changelog/529.improvement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Support for global slot mappings.
2 changes: 1 addition & 1 deletion rasa_sdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import rasa_sdk.cli
from rasa_sdk.interfaces import Tracker, Action, ActionExecutionRejection
from rasa_sdk.forms import FormValidationAction
from rasa_sdk.forms import ValidationAction

if __name__ == "__main__":
import rasa_sdk.__main__
Expand Down
Loading