Skip to content

Commit

Permalink
prepared release of version 3.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sanchariGr committed Jun 13, 2023
1 parent 2e32306 commit 70d59bf
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 38 deletions.
44 changes: 44 additions & 0 deletions CHANGELOG.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,50 @@ https://github.com/RasaHQ/rasa/tree/main/changelog/ . -->

<!-- TOWNCRIER -->

## [3.6.0] - 2023-06-13

Rasa_Sdk 3.6.0 (2023-06-13)
### Deprecations and Removals
- [#975](https://github.com/rasahq/rasa-sdk/issues/975): Drop support for Python 3.7 as [it is approaching its end of life in June 2023](https://peps.python.org/pep-0537/#lifespan).

### Features
- [#970](https://github.com/rasahq/rasa-sdk/issues/970): Add pluggy to provide ability to create sanic extensions in rasa-sdk

### Improvements
- [#922](https://github.com/rasahq/rasa-sdk/issues/922): ## Problem
Rasa knowledge base actions cannot infer the object type of an object directly from the user message without the user first asking to list all objects related to that object type. This prevents action_query_knowledge from providing a suitable response when a user asks for a certain attribute of an object even though the knowledge base has the relevant information. That is, the knowledge base actions require the slot `object_type` to be set to one of the primary key values in the knowledge base for it to search through the objects. Here is an example:
```
Your input -> what is the price range of Berlin Burrito Company?
Sorry, I'm not sure I understand. Can you rephrase?
Your input -> list some restaurants
Found the following objects of type 'restaurant':
1: Gong Gan
2: I due forni
3: Pfefferberg
4: Lụa Restaurant
5: Donath
Your input -> what is the price range of Berlin Burrito Company?
'Berlin Burrito Company' has the value 'cheap' for attribute 'price-range'.
```

## Proposed solution
- The improvement requires changes to the classes ActionQueryKnowledgeBase and InMemoryKnowledgeBase under rasa-sdk.
- The `object_type` can be inferred by utilizing the entity extraction (DIET) where object types are used as entities to annotate object names.
This also requires changes to be made to slot management to enable dynamic inference of `object_type`.
- The scope of the suggested solution is limited to user queries where they ask for an attribute of a given object without mentioning the object type and without needing to first ask for a list of options of the corresponding object type.
- E.g.: If the user asks for ‘price range of Berlin Burrito Company’, then rasa will extract and set attribute slot value to ‘price-range’ and hotel slot value to ‘Berlin Burrito Company’. From this, it can be inferred that the user is talking about the object type ‘hotel’.

## Summary of Changes
- To enable the inference of `object_type` using the entities the following changes were made to the existing code base:
- Extract the list of object_types from our knowledge base using a new method `get_object_types()` in `storage.py` for the `InMemoryKnowledgeBase` class.
- A new method named `match_extracted_entities_to_object_type()` was added in `utils.py` to infer the object type of a given object using the entities and list of object types
- The relevant logic was added in `actions.py` to infer the object type using the above functionalities when the object type slot is not set.
- To enable dynamic inference of `object_type`, changes to slot management are also required. Currently, the change is to reset the `object_type` slot to `None` after every conversation turn.

### Miscellaneous internal changes
- [#968](https://github.com/rasahq/rasa-sdk/issues/968), [#969](https://github.com/rasahq/rasa-sdk/issues/969)


## [3.5.1] - 2023-04-11

Rasa_Sdk 3.5.1 (2023-04-11)
Expand Down
29 changes: 0 additions & 29 deletions changelog/922.improvement.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog/968.misc.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog/969.misc.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog/970.feature.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog/975.removal.md

This file was deleted.

8 changes: 4 additions & 4 deletions 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 = "3.6.0a1"
version = "3.6.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 Expand Up @@ -97,13 +97,13 @@ semantic_version = "^2.8.5"
mypy = "^1.3"
sanic-testing = "^22.3.0, <22.9.0"

[tool.ruff.pydocstyle]
convention = "google"

[tool.pytest.ini_options]
python_functions = "test_"
asyncio_mode = "auto"

[tool.ruff.pydocstyle]
convention = "google"

[tool.poetry.group.dev.dependencies]
ruff = ">=0.0.256,<0.0.268"
pytest-asyncio = "^0.21.0"
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__ = "3.6.0a1"
__version__ = "3.6.0"

0 comments on commit 70d59bf

Please sign in to comment.