Skip to content

Commit

Permalink
Merge pull request #602 from janhq/chore/remove-parameter-for-run-com…
Browse files Browse the repository at this point in the history
…mand

chore: remove parameter for run command
  • Loading branch information
namchuai authored May 23, 2024
2 parents 7802290 + b063cac commit 3a26ee0
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions cortex-js/src/infrastructure/commanders/shortcuts/run.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ import { exit } from 'node:process';
import { ChatCliUsecases } from '../usecases/chat.cli.usecases';
import { defaultCortexCppHost, defaultCortexCppPort } from 'constant';

type RunOptions = {
model?: string;
};

@SubCommand({
name: 'run',
description: 'EXPERIMENTAL: Shortcut to start a model and chat',
Expand All @@ -22,12 +18,12 @@ export class RunCommand extends CommandRunner {
super();
}

async run(_input: string[], option: RunOptions): Promise<void> {
const modelId = option.model;
if (!modelId) {
console.error('Model ID is required');
async run(input: string[]): Promise<void> {
if (input.length === 0) {
console.error('Model Id is required');
exit(1);
}
const modelId = input[0];

await this.cortexUsecases.startCortex(
defaultCortexCppHost,
Expand Down

0 comments on commit 3a26ee0

Please sign in to comment.