向宁 67b030c3c5 feat: add AI chat, RAG Q&A, knowledge base, embeddings, document processing
- AI chat with SSE streaming (Microsoft Agent Framework + Qwen)
- RAG Q&A with hybrid retrieval (vector + keyword RRF fusion)
- Knowledge base CRUD with semantic text chunking
- Embedding generation via Azure.AI.OpenAI / LM Studio
- Document upload with chunked upload support
- Redis caching for chat messages
- Chunk/vector preview endpoints
- gRPC auth service improvements
- Removed demo menus, cleaned up seed data
2026-05-20 20:28:15 +08:00

14 lines
501 B
C#

using FluentValidation;
namespace RAG.Application.KnowledgeBase.Validators;
public class CreateKnowledgeBaseCommandValidator : AbstractValidator<Commands.CreateKnowledgeBaseCommand>
{
public CreateKnowledgeBaseCommandValidator()
{
RuleFor(x => x.Name).NotEmpty().WithMessage("知识库名称不能为空")
.MaximumLength(200).WithMessage("名称不能超过200个字符");
RuleFor(x => x.Description).MaximumLength(1000).When(x => x.Description != null);
}
}