Improve assistant status probes and cognition routing coverage
CI / test (push) Failing after 14s

This commit is contained in:
m
2026-08-18 16:50:19 +03:00
parent 1a62be1e34
commit b025bec777
3 changed files with 11 additions and 2 deletions
+5 -2
View File
@@ -560,14 +560,17 @@ func containsModelReference(tokens []string) bool {
}
func isAssistantStatusProbe(primary, secondary interaction.SpeechAct, tokens []string) bool {
if primary != interaction.SpeechActAssertion && primary != interaction.SpeechActCorrection && primary != interaction.SpeechActQuestion && primary != interaction.SpeechActRequestToInvestigate {
if primary != interaction.SpeechActAssertion && primary != interaction.SpeechActCorrection && primary != interaction.SpeechActQuestion && primary != interaction.SpeechActRequestToInvestigate && primary != interaction.SpeechActUnknown {
return false
}
if !(containsToken(tokens, "домовой") || containsToken(tokens, "ассистент") || containsToken(tokens, "бот") || containsToken(tokens, "ты") || containsToken(tokens, "ии") || containsToken(tokens, "ai") || containsToken(tokens, "gpt")) {
return false
}
if containsToken(tokens, "не") && containsStemInTokens(tokens, "вид", "виж", "понима", "ответ", "отвеч", "работа", "реагир", "слыш", "слуш", "ищ", "уведом", "чувств") {
return true
}
for index := 0; index < len(tokens)-1; index++ {
if tokens[index] == "не" && (containsStem(tokens[index+1], "вид", "виж", "понима", "ответ", "работа", "реагир", "слыш", "ищ", "уведом", "чувств")) {
if tokens[index] == "не" && (containsStem(tokens[index+1], "вид", "виж", "понима", "ответ", "отвеч", "работа", "реагир", "слыш", "слуш", "ищ", "уведом", "чувств")) {
return true
}
}