feat: 迁移plant

This commit is contained in:
Blizzard
2026-05-23 13:55:05 +08:00
parent a93477ea8e
commit ae6d03d351
228 changed files with 25296 additions and 917 deletions
@@ -5,6 +5,7 @@ package ai
import (
"context"
"fmt"
"sundynix-micro-go/app/plant/api/internal/svc"
"sundynix-micro-go/app/plant/api/internal/types"
@@ -27,8 +28,8 @@ func NewAiChatLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AiChatLogi
}
}
func (l *AiChatLogic) AiChat(req *types.AiChatReq) error {
// todo: add your logic here and delete this line
return nil
func (l *AiChatLogic) AiChat(req *types.AiChatReq) (string, error) {
l.Logger.Infof("AI chat request: %s", req.Question)
userID := fmt.Sprintf("%v", l.ctx.Value("userId"))
return ChatCompletion(l.ctx, l.svcCtx, userID, req.Question)
}