Files
WeiCHEN a5ea8197ab fix(coordinator): force Tavily search for weather/realtime dialogue answers
Anchor weather and other realtime questions on runner /v1/search results (or an explicit refuse constraint) so the model cannot invent dates or temperatures from training memory.
2026-09-23 14:51:09 +08:00

35 lines
713 B
Go

package coordinator
import "testing"
func TestIsRealtimeInformationQuery(t *testing.T) {
positives := []string{
"今天北京天气怎么样",
"明天会下雨吗",
"外面气温多少",
"今天有什么新闻",
"美元汇率多少",
"查一下实时股价",
}
for _, in := range positives {
if !IsRealtimeInformationQuery(in) {
t.Fatalf("expected realtime query: %q", in)
}
}
negatives := []string{
"",
"a",
"项目进度怎么样",
"型检温度指标怎么定",
"注册路径需要注意什么",
"帮我推进 V0.5 方案",
"你好",
}
for _, in := range negatives {
if IsRealtimeInformationQuery(in) {
t.Fatalf("did not expect realtime query: %q", in)
}
}
}