All checks were successful
ci/woodpecker/push/ci Pipeline was successful
Co-authored-by: Jason Woltje <jason@diversecanvas.com> Co-committed-by: Jason Woltje <jason@diversecanvas.com>
49 lines
733 B
TypeScript
49 lines
733 B
TypeScript
import {
|
|
IsBoolean,
|
|
IsIn,
|
|
IsObject,
|
|
IsOptional,
|
|
IsString,
|
|
IsUUID,
|
|
MaxLength,
|
|
} from 'class-validator';
|
|
|
|
export class CreateConversationDto {
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(255)
|
|
title?: string;
|
|
|
|
@IsOptional()
|
|
@IsUUID()
|
|
projectId?: string;
|
|
}
|
|
|
|
export class UpdateConversationDto {
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(255)
|
|
title?: string;
|
|
|
|
@IsOptional()
|
|
@IsUUID()
|
|
projectId?: string | null;
|
|
|
|
@IsOptional()
|
|
@IsBoolean()
|
|
archived?: boolean;
|
|
}
|
|
|
|
export class SendMessageDto {
|
|
@IsIn(['user', 'assistant', 'system'])
|
|
role!: 'user' | 'assistant' | 'system';
|
|
|
|
@IsString()
|
|
@MaxLength(10_000)
|
|
content!: string;
|
|
|
|
@IsOptional()
|
|
@IsObject()
|
|
metadata?: Record<string, unknown>;
|
|
}
|