Skip to content

Commit

Permalink
Merge pull request #12814 from RasaHQ/ATO-1529-fix-domain-responses-k…
Browse files Browse the repository at this point in the history
…ey-error-3.6.x

[ATO 1529] Port fix to 3.6.x
  • Loading branch information
Tawakalt authored Sep 15, 2023
2 parents c6bfa48 + d9c0e0c commit e5a95f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog/12790.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed `KeyError` which resulted when `domain_responses` doesn't exist as a keyword argument while using a custom action dispatcher with nlg server.
2 changes: 1 addition & 1 deletion rasa/core/nlg/callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async def generate(
**kwargs: Any,
) -> Dict[Text, Any]:
"""Retrieve a named response from the domain using an endpoint."""
domain_responses = kwargs.pop("domain_responses")
domain_responses = kwargs.pop("domain_responses", None)
response_id = self.fetch_response_id(
utter_action, tracker, output_channel, domain_responses
)
Expand Down

0 comments on commit e5a95f6

Please sign in to comment.