Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cortex-js/src/infrastructure/constants/cortex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ export const CORTEX_ENGINE_RELEASES_URL = (engine: string) =>
export const CUDA_DOWNLOAD_URL =
'https://catalog.jan.ai/dist/cuda-dependencies/<version>/<platform>/cuda.tar.gz';

export const telemetryServerUrl = 'http://192.168.100.30:1338';
export const telemetryServerUrl = 'https://telemetry.jan.ai';
19 changes: 9 additions & 10 deletions cortex-js/src/infrastructure/controllers/models.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
};
Expand Down Expand Up @@ -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.',
};
Expand Down