This commit is contained in:
@@ -560,14 +560,17 @@ func containsModelReference(tokens []string) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func isAssistantStatusProbe(primary, secondary interaction.SpeechAct, 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
|
return false
|
||||||
}
|
}
|
||||||
if !(containsToken(tokens, "домовой") || containsToken(tokens, "ассистент") || containsToken(tokens, "бот") || containsToken(tokens, "ты") || containsToken(tokens, "ии") || containsToken(tokens, "ai") || containsToken(tokens, "gpt")) {
|
if !(containsToken(tokens, "домовой") || containsToken(tokens, "ассистент") || containsToken(tokens, "бот") || containsToken(tokens, "ты") || containsToken(tokens, "ии") || containsToken(tokens, "ai") || containsToken(tokens, "gpt")) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
if containsToken(tokens, "не") && containsStemInTokens(tokens, "вид", "виж", "понима", "ответ", "отвеч", "работа", "реагир", "слыш", "слуш", "ищ", "уведом", "чувств") {
|
||||||
|
return true
|
||||||
|
}
|
||||||
for index := 0; index < len(tokens)-1; index++ {
|
for index := 0; index < len(tokens)-1; index++ {
|
||||||
if tokens[index] == "не" && (containsStem(tokens[index+1], "вид", "виж", "понима", "ответ", "работа", "реагир", "слыш", "ищ", "уведом", "чувств")) {
|
if tokens[index] == "не" && (containsStem(tokens[index+1], "вид", "виж", "понима", "ответ", "отвеч", "работа", "реагир", "слыш", "слуш", "ищ", "уведом", "чувств")) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,6 +87,9 @@ func TestDeterministicCandidateTreatsModalExplanationRequestsAsCognitionWorthWit
|
|||||||
"РАССКАЖИ ПОХОЖЕ ЧТО ПРОИСХОДИТ",
|
"РАССКАЖИ ПОХОЖЕ ЧТО ПРОИСХОДИТ",
|
||||||
"можете обяснить почему база растет",
|
"можете обяснить почему база растет",
|
||||||
"ты не видишь ии",
|
"ты не видишь ии",
|
||||||
|
"домовой не отвечает",
|
||||||
|
"домовой не работает",
|
||||||
|
"домовой не реагирует",
|
||||||
} {
|
} {
|
||||||
candidate := BuildDeterministicCandidate(message, "", time.Unix(10, 0).UnixMilli())
|
candidate := BuildDeterministicCandidate(message, "", time.Unix(10, 0).UnixMilli())
|
||||||
if !candidate.NeedsCognition {
|
if !candidate.NeedsCognition {
|
||||||
|
|||||||
@@ -148,6 +148,9 @@ func TestInterpretUtteranceNaturalRussianHelpflowUsesContextAwareCognitionInput(
|
|||||||
{message: "СЕЙЧАС ДОМОВОЙ НЕ ВИДИТ ИИ", wantSpeech: "", wantCognition: true, allowNoMatch: true},
|
{message: "СЕЙЧАС ДОМОВОЙ НЕ ВИДИТ ИИ", wantSpeech: "", wantCognition: true, allowNoMatch: true},
|
||||||
{message: "не понимаю меня не понимает ии", wantSpeech: "", wantCognition: true, allowNoMatch: true},
|
{message: "не понимаю меня не понимает ии", wantSpeech: "", wantCognition: true, allowNoMatch: true},
|
||||||
{message: "домовой не вижит ии", wantSpeech: "", wantCognition: true, allowNoMatch: true},
|
{message: "домовой не вижит ии", wantSpeech: "", wantCognition: true, allowNoMatch: true},
|
||||||
|
{message: "домовой не отвечает мне", wantSpeech: "", wantCognition: true, allowNoMatch: true},
|
||||||
|
{message: "домовой не слушает меня", wantSpeech: "", wantCognition: true, allowNoMatch: true},
|
||||||
|
{message: "домовой не отвечает на команды", wantSpeech: "", wantCognition: true, allowNoMatch: true},
|
||||||
}
|
}
|
||||||
for _, tc := range cases {
|
for _, tc := range cases {
|
||||||
result := interpretForTest(t, tc.message, nil, "")
|
result := interpretForTest(t, tc.message, nil, "")
|
||||||
|
|||||||
Reference in New Issue
Block a user