fix(quick-qa): distinguish web and knowledge base retrieval in pipeline UI
Emit search_source metadata from RAG progress events so quick-answer steps, summaries, and IM labels no longer mislabel web-only results as knowledge base search.
This commit is contained in:
@@ -81,6 +81,17 @@ func TestFormatIMRagPipelineLine_searchWithQuery(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestFormatIMRagPipelineLine_webSearchWithQuery(t *testing.T) {
|
||||
line := FormatIMRagPipelineLine(IMToolStep{
|
||||
ToolName: "knowledge_search",
|
||||
Pending: true,
|
||||
Arguments: map[string]any{"query": "任素汐演唱会", "search_source": "web"},
|
||||
})
|
||||
if line != "正在检索网络:「任素汐演唱会」" {
|
||||
t.Fatalf("line = %q", line)
|
||||
}
|
||||
}
|
||||
|
||||
func TestIMGetQueryText_joinsUniqueQueries(t *testing.T) {
|
||||
got := imGetQueryText(map[string]any{
|
||||
"query": "foo",
|
||||
|
||||
Reference in New Issue
Block a user