Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove parameter for run command #602

Merged
merged 1 commit into from
May 23, 2024
Merged
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
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