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
8 changes: 3 additions & 5 deletions cortex-js/src/infrastructure/commanders/chat.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,21 +109,19 @@ export class ChatCommand extends BaseCommand {

const preset = await this.fileService.getPreset(options.preset);

return this.cortex.models.start(modelId, preset).then(() =>
this.chatClient.chat(
return this.chatClient.chat(
modelId,
options.threadId,
message, // Accept both message from inputs or arguments
preset ? preset : {},
),
);
)
}

modelInquiry = async (models: Cortex.Model[]) => {
const { model } = await this.inquirerService.inquirer.prompt({
type: 'list',
name: 'model',
message: 'Select running model to chat with:',
message: 'Select a model to chat with:',
choices: models.map((e) => ({
name: e.id,
value: e.id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class EmbeddingCommand extends BaseCommand {
const { model } = await this.inquirerService.inquirer.prompt({
type: 'list',
name: 'model',
message: 'Select running model to chat with:',
message: 'Select model to chat with:',
choices: models.map((e) => ({
name: e.id,
value: e.id,
Expand Down