feat: 集成 AI 对话与只读查询工具
This commit is contained in:
38
apps/server/src/ai-chat/dto/ai-chat.dto.ts
Normal file
38
apps/server/src/ai-chat/dto/ai-chat.dto.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import { Type } from 'class-transformer';
|
||||
import { IsInt, IsNotEmpty, IsOptional, IsString, Max, MaxLength, Min } from 'class-validator';
|
||||
|
||||
export class CreateConversationDto {
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(100)
|
||||
title?: string;
|
||||
}
|
||||
|
||||
export class RenameConversationDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@MaxLength(100)
|
||||
title: string;
|
||||
}
|
||||
|
||||
export class SendMessageDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@MaxLength(16000)
|
||||
message: string;
|
||||
}
|
||||
|
||||
export class MessagePageQueryDto {
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
@IsInt()
|
||||
@Min(1)
|
||||
page?: number;
|
||||
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
@IsInt()
|
||||
@Min(1)
|
||||
@Max(100)
|
||||
limit?: number;
|
||||
}
|
||||
Reference in New Issue
Block a user