From 0b15da6c5ff60abe6786beb6def27b3685c1c470 Mon Sep 17 00:00:00 2001 From: irfanpena Date: Fri, 31 May 2024 09:38:15 +0700 Subject: [PATCH] api: Update the API decorator --- cortex-js/src/infrastructure/controllers/chat.controller.ts | 4 ++++ cortex-js/src/main.ts | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cortex-js/src/infrastructure/controllers/chat.controller.ts b/cortex-js/src/infrastructure/controllers/chat.controller.ts index f24d68d7a..34af8b2eb 100644 --- a/cortex-js/src/infrastructure/controllers/chat.controller.ts +++ b/cortex-js/src/infrastructure/controllers/chat.controller.ts @@ -17,6 +17,10 @@ import { ChatCompletionResponseDto } from '../dtos/chat/chat-completion-response export class ChatController { constructor(private readonly chatService: ChatUsecases) {} + @ApiOperation({ + summary: 'Create chat completion', + description: "Creates a model response for the given conversation.", + }) @HttpCode(200) @ApiResponse({ status: 200, diff --git a/cortex-js/src/main.ts b/cortex-js/src/main.ts index 3eaa8fc42..695017d3e 100644 --- a/cortex-js/src/main.ts +++ b/cortex-js/src/main.ts @@ -27,7 +27,6 @@ async function bootstrap() { .setTitle('Cortex API') .setDescription('Cortex API provides a command-line interface (CLI) for seamless interaction with large language models (LLMs). Fully compatible with the [OpenAI API](https://platform.openai.com/docs/api-reference), it enables straightforward command execution and management of LLM interactions.') .setVersion('1.0') - .addTag('Cortex', 'These endpoints control the start and stop operations of the Cortex system.') .addTag('Inference', 'This endpoint initiates interaction with a Language Learning Model (LLM).') .addTag('Assistants', 'These endpoints manage the lifecycle of an Assistant within a conversation thread.') .addTag('Models', 'These endpoints provide a list and descriptions of all available models within the Cortex framework.')