Skip to content

Commit

Permalink
Update the URL and API desc
Browse files Browse the repository at this point in the history
  • Loading branch information
irfanpena committed Jun 27, 2024
1 parent e201b86 commit 5d639bd
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
11 changes: 9 additions & 2 deletions cortex-js/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,17 @@ export const getApp = async () => {
)
.addTag(
'Events',
'Endpoints for observing Cortex statuses through event notifications.',
'Endpoints for observing Cortex statuses through event notifications.',
)
.addTag(
'Configurations',
"Endpoints for customizing the Cortex's configurations.",
)
.addTag(
'Engines',
'Endpoints for managing the available engines within Cortex.',
)
.addServer('http://localhost:1337')
.addServer('http://localhost:1337/v1')
.build();
const document = SwaggerModule.createDocument(app, config);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ export class ModelsController {
}

@ApiOperation({
summary: 'Abort model download',
description: 'Abort the model download operation.',
parameters: [
{
in: 'path',
Expand All @@ -136,7 +138,7 @@ export class ModelsController {
type: DownloadModelResponseDto,
})
@ApiOperation({
summary: 'Pulls a remote model and download it',
summary: 'Download a remote model',
description:
'Pulls a remote model template from cortex hub or huggingface and downloads it.',
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { IsString } from 'class-validator';

export class CommonResponseDto {
@ApiProperty({
description: 'The success or error message',
description: 'The response success or error message.',
})
@IsString()
message: string;
Expand Down
6 changes: 3 additions & 3 deletions cortex-js/src/infrastructure/dtos/engines/engines.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class EngineDto implements Partial<Extension> {
@ApiProperty({
type: String,
example: 'Cortex',
description: 'The display name of the engine',
description: 'The display name of the engine.',
})
@IsString()
@IsOptional()
Expand All @@ -25,7 +25,7 @@ export class EngineDto implements Partial<Extension> {
@ApiProperty({
type: String,
example: 'Cortex engine',
description: 'The description of the engine',
description: 'The description of the engine.',
})
@IsString()
@IsOptional()
Expand All @@ -34,7 +34,7 @@ export class EngineDto implements Partial<Extension> {
@ApiProperty({
type: String,
example: '0.0.1',
description: 'The version of the engine',
description: 'The version of the engine.',
})
@IsString()
@IsOptional()
Expand Down

0 comments on commit 5d639bd

Please sign in to comment.