Continue local search from conversation context
This commit is contained in:
@@ -85,6 +85,16 @@ func TestLocalSearchClarification(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestContinueLocalSearch(t *testing.T) {
|
||||
history := []interaction.HumanUtterance{{Content: "Найди ближайший ресторан"}}
|
||||
if got := ContinueLocalSearch("в Сочи", history); got != "Найди ближайший ресторан в Сочи" {
|
||||
t.Fatalf("unexpected continuation: %q", got)
|
||||
}
|
||||
if got := ContinueLocalSearch("в Сочи", nil); got != "" {
|
||||
t.Fatalf("location must not create a goal without conversation context: %q", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestTravelSearchClarification(t *testing.T) {
|
||||
if got := TravelSearchClarification("Найди билеты", nil); got == "" {
|
||||
t.Fatal("underspecified travel request must ask for missing route and date")
|
||||
|
||||
Reference in New Issue
Block a user