feat: Add agent configuration and cleanup scripts for database migrations

This commit is contained in:
wizardchen
2025-11-05 23:18:44 +08:00
parent ae9d0778e9
commit 4fa3adbf3b
126 changed files with 22506 additions and 629 deletions
@@ -2,6 +2,7 @@ package chatpipline
import (
"context"
"errors"
"github.com/Tencent/WeKnora/internal/logger"
"github.com/Tencent/WeKnora/internal/types"
@@ -55,6 +56,10 @@ func (p *PluginChatCompletionStream) OnEvent(ctx context.Context,
logger.Errorf(ctx, "Failed to call chat stream model: %v", err)
return ErrModelCall.WithError(err)
}
if responseChan == nil {
logger.Error(ctx, "Chat stream returned nil channel")
return ErrModelCall.WithError(errors.New("chat stream returned nil channel"))
}
logger.Info(ctx, "Chat stream initiated successfully")
chatManage.ResponseChan = responseChan