diff --git a/cortex-js/src/infrastructure/constants/cortex.ts b/cortex-js/src/infrastructure/constants/cortex.ts index 28ce267f5..0f7d5b7cc 100644 --- a/cortex-js/src/infrastructure/constants/cortex.ts +++ b/cortex-js/src/infrastructure/constants/cortex.ts @@ -48,4 +48,4 @@ export const CORTEX_ENGINE_RELEASES_URL = (engine: string) => export const CUDA_DOWNLOAD_URL = 'https://catalog.jan.ai/dist/cuda-dependencies///cuda.tar.gz'; -export const telemetryServerUrl = 'http://192.168.100.30:1338'; +export const telemetryServerUrl = 'https://telemetry.jan.ai'; diff --git a/cortex-js/src/infrastructure/controllers/models.controller.ts b/cortex-js/src/infrastructure/controllers/models.controller.ts index 742b1b4ca..11fcd4f7d 100644 --- a/cortex-js/src/infrastructure/controllers/models.controller.ts +++ b/cortex-js/src/infrastructure/controllers/models.controller.ts @@ -115,15 +115,14 @@ export class ModelsController { }, ], }) - @Get('download/:modelId(*)') - async downloadModel(@Param('modelId') modelId: string) { - await this.modelsUsecases.pullModel(modelId, false); - - this.telemetryUsecases.addEventToQueue({ + @Get('download/:modelId(*)') + downloadModel(@Param('modelId') modelId: string) { + this.modelsUsecases.pullModel(modelId, false).then(() => this.telemetryUsecases.addEventToQueue({ name: EventName.DOWNLOAD_MODEL, modelId, - }); + }) + ); return { message: 'Download model started successfully.', }; @@ -163,12 +162,12 @@ export class ModelsController { description: 'The unique identifier of the model.', }) @Get('pull/:modelId(*)') - async pullModel(@Param('modelId') modelId: string) { - await this.modelsUsecases.pullModel(modelId); - this.telemetryUsecases.addEventToQueue({ + pullModel(@Param('modelId') modelId: string) { + this.modelsUsecases.pullModel(modelId).then(() => this.telemetryUsecases.addEventToQueue({ name: EventName.DOWNLOAD_MODEL, modelId, - }); + }) + ); return { message: 'Download model started successfully.', };