Skip to content

Commit

Permalink
Merge pull request #584 from janhq/chore/fix-binary-path
Browse files Browse the repository at this point in the history
chore: fix local path
  • Loading branch information
namchuai authored May 17, 2024
2 parents 78d5f70 + e4ed6cd commit e7ef1ac
Show file tree
Hide file tree
Showing 10 changed files with 262 additions and 254 deletions.
2 changes: 1 addition & 1 deletion cortex-js/src/command.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { CliUsecasesModule } from './infrastructure/commanders/usecases/cli.usec
ChatModule,
ExtensionModule,
HttpModule,
CliUsecasesModule
CliUsecasesModule,
],
providers: [
CortexCommand,
Expand Down
1 change: 0 additions & 1 deletion cortex-js/src/domain/models/huggingface.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export interface HuggingFaceRepoData {
downloadUrl?: string;
fileSize?: number;
quantization?: Quantization;
stopWord?: string;
}[];
createdAt: string;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { ModelsUsecases } from '@/usecases/models/models.usecases';
import { CommandRunner, SubCommand } from 'nest-commander';
import { ModelsCliUsecases } from '../usecases/models.cli.usecases';
import { exit } from 'node:process';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { ModelsUsecases } from '@/usecases/models/models.usecases';
import { CommandRunner, SubCommand } from 'nest-commander';
import { ModelsCliUsecases } from '../usecases/models.cli.usecases';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { CommandRunner, SubCommand } from 'nest-commander';
import { Presets, SingleBar } from 'cli-progress';
import { exit } from 'node:process';
import { ModelsCliUsecases } from '../usecases/models.cli.usecases';

Expand All @@ -19,15 +18,7 @@ export class ModelPullCommand extends CommandRunner {
exit(1);
}

const bar = new SingleBar({}, Presets.shades_classic);
bar.start(100, 0);
const callback = (progress: number) => {
bar.update(progress);
};
await this.modelsCliUsecases.pullModel(
input[0],
callback,
);
await this.modelsCliUsecases.pullModel(input[0]);
console.log('\nDownload complete!');
exit(0);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export interface InitOptions {
runMode?: 'CPU' | 'GPU';
gpuType?: 'Nvidia' | 'Others (Vulkan)';
instructions?: 'AVX' | 'AVX2' | 'AVX512' | undefined;
cudaVersion?: '11' | '12';
installCuda?: 'Yes' | string
}
runMode?: 'CPU' | 'GPU';
gpuType?: 'Nvidia' | 'Others (Vulkan)';
instructions?: 'AVX' | 'AVX2' | 'AVX512' | undefined;
cudaVersion?: '11' | '12';
installCuda?: 'Yes' | string;
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Module } from "@nestjs/common";
import { InitCliUsecases } from "./init.cli.usecases";
import { HttpModule } from "@nestjs/axios";
import { ModelsCliUsecases } from "./models.cli.usecases";
import { ModelsModule } from "@/usecases/models/models.module";
import { Module } from '@nestjs/common';
import { InitCliUsecases } from './init.cli.usecases';
import { HttpModule } from '@nestjs/axios';
import { ModelsCliUsecases } from './models.cli.usecases';
import { ModelsModule } from '@/usecases/models/models.module';

@Module({
imports: [HttpModule, ModelsModule],
controllers: [],
providers: [InitCliUsecases, ModelsCliUsecases],
exports: [InitCliUsecases, ModelsCliUsecases],
})
export class CliUsecasesModule {}
imports: [HttpModule, ModelsModule],
controllers: [],
providers: [InitCliUsecases, ModelsCliUsecases],
exports: [InitCliUsecases, ModelsCliUsecases],
})
export class CliUsecasesModule {}
Loading

0 comments on commit e7ef1ac

Please sign in to comment.