fix: rewrite query is empty

This commit is contained in:
wizardchen
2025-09-10 19:30:00 +08:00
committed by lyingbug
parent 79b9315758
commit 8a2b38da6f
@@ -166,8 +166,10 @@ func (p *PluginRewrite) OnEvent(ctx context.Context,
return next()
}
// Update rewritten query
chatManage.RewriteQuery = response.Content
if response.Content != "" {
// Update rewritten query
chatManage.RewriteQuery = response.Content
}
logger.GetLogger(ctx).Infof("Rewritten query, session_id: %s, rewrite_query: %s",
chatManage.SessionID, chatManage.RewriteQuery)
return next()