Skip to content

Commit

Permalink
Fix socketio issue when using custom payload outputs (#144)
Browse files Browse the repository at this point in the history
* do not unpack json payload if data key is not present

* add room arg to else branch

* prepared release of version 3.7.3.dev1 (#151)

* Prepare-release-3.7.3.dev2 (#164)

* prepared release of version 3.7.3.dev2

* allow dev releases without changelogs

* add changelog entry

---------

Co-authored-by: Shailendra Paliwal <hello@shailendra.me>
  • Loading branch information
ancalita and vcidst authored Feb 1, 2024
1 parent a7415f4 commit 8350a1a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
12 changes: 6 additions & 6 deletions CHANGELOG.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## [3.7.5] - 2024-01-24
Rasa 3.7.5 (2024-01-24)

Rasa 3.7.5 (2024-01-24)
### Improvements
- [#193](https://github.com/rasahq/rasa/issues/193): Add new embedding types: `huggingface` and `huggingface_bge`. These new types import the `HuggingFaceEmbeddings` and `HuggingFaceBgeEmbeddings` embedding classes from Langchain.

Expand All @@ -12,8 +12,8 @@ Rasa 3.7.5 (2024-01-24)


## [3.7.4] - 2024-01-03
Rasa 3.7.4 (2024-01-03)

Rasa 3.7.4 (2024-01-03)
### Improvements
- [#142](https://github.com/rasahq/rasa/issues/142): Add embeddings type `azure` to simplify azure configurations, particularly when using Enterprise Search Policy

Expand All @@ -22,8 +22,8 @@ Rasa 3.7.4 (2024-01-03)


## [3.7.3] - 2023-12-21
Rasa 3.7.3 (2023-12-21)

Rasa 3.7.3 (2023-12-21)
### Improvements
- [#133](https://github.com/rasahq/rasa/issues/133): Persist prompt as part of the model and reread prompt from the model storage instead of original file path during loading. Impacts LLMCommandGenerator.
- [#141](https://github.com/rasahq/rasa/issues/141): Replaced soon to be depracted text-davinci-003 model with gpt-3.5-turbo. Affects components - LLM Intent Classifier and Contextual Response Rephraser.
Expand Down
3 changes: 3 additions & 0 deletions changelog/144.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fix reported issue, e.g. https://github.com/RasaHQ/rasa/issues/5461 in Rasa Pro:
Do not unpack json payload if `data` key is not present in the response custom output payloads when using socketio channel.
This allows assistants which use custom output payloads to work with the Rasa Inspector debugging tool.
8 changes: 5 additions & 3 deletions rasa/core/channels/socketio.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,11 @@ async def send_custom_json(
self, recipient_id: Text, json_message: Dict[Text, Any], **kwargs: Any
) -> None:
"""Sends custom json to the output."""
json_message.setdefault("room", recipient_id)

await self.sio.emit(self.bot_message_evt, **json_message)
if "data" in json_message:
json_message.setdefault("room", recipient_id)
await self.sio.emit(self.bot_message_evt, **json_message)
else:
await self.sio.emit(self.bot_message_evt, json_message, room=recipient_id)

async def send_attachment( # type: ignore[override]
self, recipient_id: Text, attachment: Dict[Text, Any], **kwargs: Any
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish_gh_release_notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def main():
return 1

version = Version(tag_name)
if version.pre:
if version.pre or version.dev:
md_body = "_Pre-release version_"
else:
md_body = parse_changelog(tag_name)
Expand Down

0 comments on commit 8350a1a

Please sign in to comment.