Skip to content

Commit

Permalink
fix: fix npm run config
Browse files Browse the repository at this point in the history
  • Loading branch information
IcyKallen committed Oct 24, 2024
1 parent 4865bb2 commit 7a124c1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/infrastructure/cli/magic-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,9 @@ async function getAwsAccountAndRegion() {
options.enableChat = config.chat.enabled;
options.bedrockRegion = config.chat.bedrockRegion;
options.enableConnect = config.chat.amazonConnect.enabled;
options.defaultEmbedding = (config.model.embeddingsModels ?? [])
.find((m: any) => m.default)?.name ?? embeddingModels[0].name;
options.defaultEmbedding = config.model.embeddingsModels && config.model.embeddingsModels.length > 0
? config.model.embeddingsModels[0].name
: embeddingModels[0].name;
options.defaultLlm = config.model.llms.find((m) => m.provider === "bedrock")?.name;
options.sagemakerModelS3Bucket = config.model.modelConfig.modelAssetsBucket;
options.enableUI = config.ui.enabled;
Expand Down Expand Up @@ -516,3 +517,4 @@ async function processCreateOptions(options: any): Promise<void> {
? createConfig(config)
: console.log("Skipping");
}

0 comments on commit 7a124c1

Please sign in to comment.