first commit
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// dto/content-response.dto.ts
|
||||
export class ContentResponseDto {
|
||||
topic: string;
|
||||
final: string;
|
||||
draft?: string;
|
||||
reviewNotes?: string;
|
||||
detectedStyle: string;
|
||||
detectedTone: string;
|
||||
tokensUsed: number;
|
||||
model: string;
|
||||
prompt: string;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// dto/generate-comment.dto.ts
|
||||
import { IsEnum, IsString, IsOptional, MaxLength } from 'class-validator';
|
||||
import { ContentTone } from '../enum/tone.enum';
|
||||
import * as languagePromptInterface from "../../../common/interfaces/language.prompt.interface";
|
||||
|
||||
export class GenerateCommentDto {
|
||||
@IsString()
|
||||
@MaxLength(3000)
|
||||
originalPost: string; // nội dung bài X gốc
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
angle?: string; // góc nhìn muốn comment: "agree", "challenge", "add-info", "funny"
|
||||
|
||||
@IsString()
|
||||
language: languagePromptInterface.Language;
|
||||
|
||||
@IsOptional()
|
||||
@IsEnum(ContentTone)
|
||||
tone?: ContentTone;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
persona?: string; // "crypto trader", "news analyst"...
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
// dto/generate-content.dto.ts
|
||||
import { IsEnum, IsOptional, IsString, IsBoolean, MaxLength } from 'class-validator';
|
||||
import {ContentStyle} from "../enum/style.enum";
|
||||
import {Platform} from "../enum/platform.enum";
|
||||
import {ContentTone} from "../enum/tone.enum";
|
||||
import {AccountTier} from "../enum/account-tier.enum";
|
||||
import {PostLength} from "../enum/post-length.enum";
|
||||
|
||||
export class GenerateContentDto {
|
||||
@IsString()
|
||||
@MaxLength(5000)
|
||||
topic: string; // chủ đề / input thô từ user
|
||||
|
||||
@IsEnum(Platform)
|
||||
platform?: Platform;
|
||||
|
||||
@IsOptional()
|
||||
@IsEnum(AccountTier)
|
||||
accountTier?: AccountTier; // 👈 mới
|
||||
|
||||
@IsOptional()
|
||||
@IsEnum(PostLength)
|
||||
postLength?: PostLength; // 👈 user override length
|
||||
|
||||
@IsOptional()
|
||||
@IsEnum(ContentStyle)
|
||||
style?: ContentStyle; // nếu không truyền -> auto-detect
|
||||
|
||||
@IsOptional()
|
||||
@IsEnum(ContentTone)
|
||||
tone?: ContentTone;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
language?: string; // 'vi' | 'en' ... default 'en'
|
||||
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
enableReview?: boolean; // bật AI reviewer
|
||||
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
useXEnrichment?: boolean; // bật X Enrichment reviewer
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
extraInstructions?: string;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
// dto/generate-quote.dto.ts
|
||||
import { IsEnum, IsString, IsOptional, MaxLength, IsBoolean } from 'class-validator';
|
||||
import { QuoteType } from '../enum/quote-type.enum';
|
||||
import { ContentTone } from '../enum/tone.enum';
|
||||
import { PostLength } from '../enum/post-length.enum';
|
||||
import { AccountTier } from '../enum/account-tier.enum';
|
||||
|
||||
export class GenerateQuoteDto {
|
||||
@IsString()
|
||||
@MaxLength(5000)
|
||||
originalPost: string; // Tweet gốc bạn muốn quote
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
originalAuthor?: string; // username của OP (optional, giúp AI biết tone)
|
||||
|
||||
@IsOptional()
|
||||
@IsEnum(QuoteType)
|
||||
quoteType?: QuoteType; // Nếu không truyền -> AI tự chọn best fit
|
||||
|
||||
@IsString()
|
||||
language: 'en' | 'vi' | 'ja' | 'ko';
|
||||
|
||||
@IsOptional()
|
||||
@IsEnum(ContentTone)
|
||||
tone?: ContentTone;
|
||||
|
||||
@IsOptional()
|
||||
@IsEnum(PostLength)
|
||||
postLength?: PostLength; // short/medium/long (Premium)
|
||||
|
||||
@IsOptional()
|
||||
@IsEnum(AccountTier)
|
||||
accountTier?: AccountTier;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
persona?: string; // "crypto analyst", "tech journalist"...
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
yourAngle?: string; // Góc nhìn riêng của bạn muốn express
|
||||
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
enableReview?: boolean;
|
||||
|
||||
@IsOptional()
|
||||
tweetId?: number;
|
||||
}
|
||||
Reference in New Issue
Block a user