Generate Article

This functionality allows the user to generate an article starting from a minimal description.

Set of parameters are available that enables some customization.

Parameter
Type
Description

eventDetails

string

Description for the generated article

lanaguage

English | Arabic

length

SMALL | MEDIUM | LONG

model

GPT_35 | GPT_4O

tone

FORMAL | INFORMATIVE | INSPIRATIONAL

topic

string

import { AIService } from '@tradinos/cms-backend-ai';

export class AIController {
  constructor(private readonly _ai: AIService) {}

  @Post('article')
  generateArticle(@Body() body: /** */) {
    return this._ai.generateArticle({
      eventDetails: body.eventDetails,
      language: body.language,
      length: body.length,
      model: body.model,
      tone: body.tone,
      topic: body.topic,
    });
  }
}

Last updated