fix: rewrite query is empty

main
wizardchen 2025-09-10 19:30:00 +08:00 committed by lyingbug
parent 79b9315758
commit 8a2b38da6f
1 changed files with 4 additions and 2 deletions

View File

@ -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()