Handle memory identity and travel follow-ups
This commit is contained in:
@@ -103,12 +103,18 @@ func TestContinueTravelOrigin(t *testing.T) {
|
||||
if got := ContinueTravelOrigin("я в Казани", nil); got != "" {
|
||||
t.Fatalf("location must not create a travel task without context: %q", got)
|
||||
}
|
||||
if got := ContinueTravelOrigin("Москва", history); got != "Как можно добраться до Сочи из города Москва" {
|
||||
t.Fatalf("bare city should complete travel origin: %q", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestTravelSearchClarification(t *testing.T) {
|
||||
if got := TravelSearchClarification("Найди билеты", nil); got == "" {
|
||||
t.Fatal("underspecified travel request must ask for missing route and date")
|
||||
}
|
||||
if got := TravelSearchClarification("Покажи ближайшие рейсы до Сочи", nil); got != "Из какого города вылетать?" {
|
||||
t.Fatalf("nearest-flight request should default date to now, got %q", got)
|
||||
}
|
||||
if got := TravelSearchClarification("Найди билеты из Москвы в Сочи на 12 сентября", nil); got != "" {
|
||||
t.Fatalf("complete travel request must proceed, got %q", got)
|
||||
}
|
||||
@@ -126,7 +132,7 @@ func TestTravelSearchClarification(t *testing.T) {
|
||||
t.Fatalf("complete general travel route must proceed, got %q", got)
|
||||
}
|
||||
contextHistory := []interaction.HumanUtterance{{Content: "Как можно добраться до Сочи?"}}
|
||||
if got := TravelSearchClarification("Найди билеты, какой ближайший самолёт", contextHistory); got != "Из какого города вылетать в Сочи и на какую дату?" {
|
||||
if got := TravelSearchClarification("Найди билеты, какой ближайший самолёт", contextHistory); got != "Из какого города вылетать в Сочи?" {
|
||||
t.Fatalf("travel destination should be inherited from context, got %q", got)
|
||||
}
|
||||
noisyContext := []interaction.HumanUtterance{
|
||||
|
||||
Reference in New Issue
Block a user