Isolate non-travel household requests #353
@@ -125,6 +125,11 @@ func TestTravelSearchClarification(t *testing.T) {
|
||||
if got := TravelSearchClarification("какая погода в Сочи?", history); got != "" {
|
||||
t.Fatalf("unrelated question must not inherit travel goal, got %q", got)
|
||||
}
|
||||
for _, message := range []string{"нарисуй птицу", "расскажи сказку", "ты кто?", "выведи свою память"} {
|
||||
if got := TravelSearchClarification(message, history); got != "" {
|
||||
t.Fatalf("non-travel request %q inherited travel goal, got %q", message, got)
|
||||
}
|
||||
}
|
||||
if got := TravelSearchClarification("Как можно добраться до Сочи?", nil); got != "Из какого города выезжать в Сочи? Подберу самолёт, поезд, автобус или машину." {
|
||||
t.Fatalf("general travel question should ask departure city, got %q", got)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user