This repository was archived by the owner on Jul 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +24
-4
lines changed
infrastructure/controllers Expand file tree Collapse file tree 4 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import { DownloadManagerService } from '@/download-manager/download-manager.serv
1313import { ModelsUsecases } from '@/usecases/models/models.usecases' ;
1414import { Controller , Sse } from '@nestjs/common' ;
1515import { EventEmitter2 } from '@nestjs/event-emitter' ;
16- import { ApiTags } from '@nestjs/swagger' ;
16+ import { ApiOperation , ApiTags } from '@nestjs/swagger' ;
1717import {
1818 Observable ,
1919 combineLatest ,
@@ -34,6 +34,10 @@ export class EventsController {
3434 private readonly eventEmitter : EventEmitter2 ,
3535 ) { }
3636
37+ @ApiOperation ( {
38+ summary : 'Get download status' ,
39+ description : "Retrieves the model's download status." ,
40+ } )
3741 @Sse ( 'download' )
3842 downloadEvent ( ) : Observable < DownloadStateEvent > {
3943 const latestDownloadState$ : Observable < DownloadStateEvent > = of ( {
@@ -60,6 +64,10 @@ export class EventsController {
6064 ) . pipe ( ) ;
6165 }
6266
67+ @ApiOperation ( {
68+ summary : 'Get model status' ,
69+ description : 'Retrieves all the available model statuses within Cortex.' ,
70+ } )
6371 @Sse ( 'model' )
6472 modelEvent ( ) : Observable < ModelStatusAndEvent > {
6573 const latestModelStatus$ : Observable < Record < ModelId , ModelStatus > > = of (
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ export class ProcessController {
88
99 @ApiOperation ( {
1010 summary : 'Terminate service' ,
11- description : 'Terminate service endpoint' ,
11+ description : 'Terminates the Cortex API endpoint server for the detached mode. ' ,
1212 } )
1313 @Delete ( )
1414 async delete ( ) {
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ export class StatusController {
77 constructor ( ) { }
88
99 @ApiOperation ( {
10- summary : 'Health check' ,
11- description : 'Health check endpoint.' ,
10+ summary : "Get health status" ,
11+ description : "Retrieves the health status of your Cortex's system." ,
1212 } )
1313 @HttpCode ( 200 )
1414 @ApiResponse ( {
Original file line number Diff line number Diff line change @@ -58,6 +58,18 @@ async function bootstrap() {
5858 'Embeddings' ,
5959 'Endpoint for creating and retrieving embedding vectors from text inputs using specified models.' ,
6060 )
61+ . addTag (
62+ 'Status' ,
63+ "Endpoint for actively querying the health status of the Cortex." ,
64+ )
65+ . addTag (
66+ 'Processes' ,
67+ 'Endpoint for terminating the Cortex API server processes.' ,
68+ )
69+ . addTag (
70+ 'Events' ,
71+ 'Endpoints for observing Cortex statuses through event notifications.' ,
72+ )
6173 . addServer ( 'http://localhost:1337' )
6274 . addServer ( 'http://localhost:1337/v1' )
6375 . build ( ) ;
You can’t perform that action at this time.
0 commit comments