From 2375d4b50f876b3f9c25ec6fdb7b5dd57914c28d Mon Sep 17 00:00:00 2001 From: Razvan Dinu Date: Tue, 30 May 2023 21:34:17 +0300 Subject: [PATCH] Fix Wolfram Alpha action error reporting. --- CHANGELOG.md | 1 + nemoguardrails/actions/math.py | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 397943f24..b34bf7145 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed the overriding of general instructions [#7](https://github.com/NVIDIA/NeMo-Guardrails/issues/7). - Fixed action parameters inspection bug [#2](https://github.com/NVIDIA/NeMo-Guardrails/issues/2). - Fixed bug related to multi-turn flows [#13](https://github.com/NVIDIA/NeMo-Guardrails/issues/13). +- Fixed Wolfram Alpha error reporting in the sample execution rail. ## [0.1.0] - 2023-04-25 diff --git a/nemoguardrails/actions/math.py b/nemoguardrails/actions/math.py index 360b635f4..a09ebe8e0 100644 --- a/nemoguardrails/actions/math.py +++ b/nemoguardrails/actions/math.py @@ -49,6 +49,10 @@ async def wolfram_alpha_request( return ActionResult( return_value=False, events=[ + { + "type": "bot_intent", + "intent": "inform wolfram alpha app id not set", + }, { "type": "bot_said", "content": "Wolfram Alpha app ID is not set. Please set the WOLFRAM_ALPHA_APP_ID environment variable.", @@ -68,6 +72,10 @@ async def wolfram_alpha_request( return ActionResult( return_value=False, events=[ + { + "type": "bot_intent", + "intent": "inform wolfram alpha not working", + }, { "type": "bot_said", "content": "Apologies, but I cannot answer this question at this time. I am having trouble getting the answer from Wolfram Alpha.",