12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- import {
- IsString,
- IsNotEmpty,
- ValidateIf,
- IsArray,
- IsNumber,
- IsObject
- } from 'class-validator'
- export class GetDialogueHistoryDto {
- @IsString()
- @IsNotEmpty({ message: 'staffId不能为空' })
- staffId: string
- @IsString()
- @ValidateIf((o) => !o.unionId)
- @IsNotEmpty({ message: 'userName不能为空' })
- userName: string
- @IsString()
- @ValidateIf((o) => !o.userName)
- @IsNotEmpty({ message: 'unionId不能为空' })
- unionId: string
- @IsString()
- @IsNotEmpty({ message: 'recentMinutes不能为空' })
- recentMinutes: string
- }
- export class GetBasePromptDto {
- @IsString()
- @IsNotEmpty({ message: 'scene不能为空' })
- scene: string
- }
- export class GetUserProfileDto {
- @IsString()
- @IsNotEmpty({ message: 'user_id不能为空' })
- userId: string
- }
- export class GetStaffProfileDto {
- @IsString()
- @IsNotEmpty({ message: 'staff_id不能为空' })
- staffId: string
- }
- export class RunPromptDto {
- @IsString()
- @IsNotEmpty({ message: 'scene不能为空' })
- scene: string
- @IsString()
- @IsNotEmpty({ message: 'prompt不能为空' })
- prompt: string
- @IsObject()
- @IsNotEmpty({ message: 'staffProfile不能为空' })
- staffProfile: StaffProfile
- @IsObject()
- @IsNotEmpty({ message: 'userProfile不能为空' })
- userProfile: UserProfile
- @IsArray()
- @IsNotEmpty({ message: 'dialogueHistory不能为空' })
- dialogueHistory: DialogueHistory
- @IsString()
- @IsNotEmpty({ message: 'modelName不能为空' })
- modelName: string
- @IsNumber()
- @IsNotEmpty({ message: 'currentTimestamp不能为空' })
- currentTimestamp: number
- }
- export class ListUsersDto {
- @IsString()
- @ValidateIf((o) => !o.unionId)
- @IsNotEmpty({ message: 'userName不能为空' })
- userName: string
- @IsString()
- @ValidateIf((o) => !o.userName)
- @IsNotEmpty({ message: 'unionId不能为空' })
- unionId: string
- }
|