Ask departure city for general travel requests
CI / test (push) Successful in 1m7s
CI / test (pull_request) Successful in 1m6s

This commit is contained in:
m
2026-08-25 07:07:57 +03:00
parent 59239635cd
commit d9000938d3
2 changed files with 21 additions and 0 deletions
@@ -109,6 +109,9 @@ func TestTravelSearchClarification(t *testing.T) {
if got := TravelSearchClarification("какая погода в Сочи?", history); got != "" {
t.Fatalf("unrelated question must not inherit travel goal, got %q", got)
}
if got := TravelSearchClarification("Как можно добраться до Сочи?", nil); got != "Из какого города выезжать в Сочи? Подберу самолёт, поезд, автобус или машину." {
t.Fatalf("general travel question should ask departure city, got %q", got)
}
contextHistory := []interaction.HumanUtterance{{Content: "Как можно добраться до Сочи?"}}
if got := TravelSearchClarification("Найди билеты, какой ближайший самолёт", contextHistory); got != "Из какого города вылетать в Сочи и на какую дату?" {
t.Fatalf("travel destination should be inherited from context, got %q", got)