fix: description and inputs for selector
@@ -7,26 +7,25 @@ from deeppavlov.core.models.component import Component
@register('rule_based_selector')
class RuleBasedSelector(Component):
"""
- Rule-based skill selector which choosing among TransferTransfo, Base AIML and Alice AIML.
- Rule: if AIML skill matches, turn it on, otherwise TransferTransfo
+ Rule-based skill selector which choosing among TransferTransfo, Base AIML and Alice AIML
"""
def __init__(self, **kwargs):
pass
def __call__(self,
- user_utterances: List[str],
- aiml_responses_batch: List[str] = None, # aiml_skill
- aiml_alice_responses_batch: List[str] = None, # alice
- aiml_chitchat_responses_batch: List[str] = None, # chitchat
- ) -> List[str]:
+ utterances_batch: List[str],
+ history_batch,
+ states_batch
+ ) -> List[List[str]]:
+
skill_names = []
- for i in range(len(user_utterances)):
+ for i in range(len(utterances_batch)):
skills_for_uttr = []
- if "aiml" in user_utterances[i]:
+ if "aiml" in utterances_batch[i]:
skills_for_uttr.append("aiml")
- if "alice" in user_utterances[i]:
+ if "alice" in utterances_batch[i]:
skills_for_uttr.append("alice")
skill_names.append(skills_for_uttr)
