fix/link_to/key_error: fix availible skills
@@ -12,6 +12,7 @@ import common.dialogflow_framework.utils.state as state_utils
import common.dialogflow_framework.utils.condition as condition_utils
import common.entity_utils as entity_utils
import common.greeting as common_greeting
+import common.link as common_link
sentry_sdk.init(dsn=os.getenv("SENTRY_DSN"))
@@ -108,6 +109,12 @@ link_to_skill2key_words = {
"dff_gossip_skill": ["gossips"],
"dff_music_skill": ["music"],
}
+
+link_to_skill2key_words = {
+ skill_name: link_to_skill2key_words[skill_name]
+ for skill_name in link_to_skill2key_words
+ if skill_name in common_link.SKILLS_FOR_LINKING
+}
link_to_skill2i_like_to_talk = {
"news_api_skill": [
"Anxious to stay current on the news.",
@@ -153,6 +160,12 @@ link_to_skill2i_like_to_talk = {
],
}
+link_to_skill2i_like_to_talk = {
+ skill_name: link_to_skill2i_like_to_talk[skill_name]
+ for skill_name in link_to_skill2i_like_to_talk
+ if skill_name in common_link.SKILLS_FOR_LINKING
+}
+
def link_to_by_enity_response(vars):
ack = random.choice(get_sentiment_acknowledgement(vars))
