Update to Rasa 3.x and Action code updates#3
Update to Rasa 3.x and Action code updates#3rgstephens wants to merge 12 commits intodeepset-ai:mainfrom
Conversation
|
Great! Thanks for upgrading this @rgstephens! |
wochinge
left a comment
There was a problem hiding this comment.
Thanks for updating this, Greg! Left a few small comments.
Co-authored-by: Tobias Wochinger <mail@tobias-wochinger.de>
|
@wochinge What's the current situation here? 🙂 Ready to merge? |
wochinge
left a comment
There was a problem hiding this comment.
Sorry for the late review. Do have time to wrap up these last comments? Otherwise I'm happy to do so. Thanks for the work 💯
Co-authored-by: Tobias Wochinger <mail@tobias-wochinger.de>
Co-authored-by: Tobias Wochinger <mail@tobias-wochinger.de>
Co-authored-by: Tobias Wochinger <mail@tobias-wochinger.de>
Co-authored-by: Tobias Wochinger <mail@tobias-wochinger.de>
Co-authored-by: Tobias Wochinger <mail@tobias-wochinger.de>
|
Sorry for the slow response and thanks for all the fixes. |
wochinge
left a comment
There was a problem hiding this comment.
Thanks for the wrap up. Tried it out and works. Only added one fix for an edge condition.
@julian-risch Can you maybe merge this (I don't have write permissions in this repo) and apply the change manually as I also can't write to Greg's repo.
| if response["answers"]: | ||
| logger.debug(f"Answers returned by haystack:\n{response}") | ||
| answer = response["answers"][0]["answer"] | ||
| if not answer: | ||
| answer = response["answers"][1]["answer"] | ||
| logger.debug(f"selected answer: {answer}") | ||
| else: | ||
| answer = "No Answer Found!" |
There was a problem hiding this comment.
the answer = response["answers"][1]["answer"] might cause an index error if there are no answers at all or less than 2 answers
| if response["answers"]: | |
| logger.debug(f"Answers returned by haystack:\n{response}") | |
| answer = response["answers"][0]["answer"] | |
| if not answer: | |
| answer = response["answers"][1]["answer"] | |
| logger.debug(f"selected answer: {answer}") | |
| else: | |
| answer = "No Answer Found!" | |
| answer = "No Answer Found!" | |
| for answer_object in response.get("answers") or []: | |
| current_answer = answer_object["answer"] | |
| if current_answer: | |
| answer = current_answer | |
| logger.debug(f"selected answer: {answer}") | |
| break |
@tholor & @wochinge This PR updates the Rasa bot to 3.x and adds action server code error handling.