Skip to content
Open
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
7 changes: 5 additions & 2 deletions cli/magic-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
SystemConfig,
SupportedBedrockRegion,
ModelConfig,
SupportedBedrockKnowledgeBaseRegion,
} from "../lib/shared/types";
import { LIB_VERSION } from "./version.js";
import * as fs from "fs";
Expand Down Expand Up @@ -787,11 +788,13 @@ async function processCreateOptions(options: any): Promise<void> {
type: "autocomplete",
limit: 8,
name: "region",
choices: ["us-east-1", "us-west-2"],
choices: Object.values(SupportedBedrockKnowledgeBaseRegion),
message: `Region of the Bedrock Knowledge Base index${
existingIndex?.region ? " (" + existingIndex?.region + ")" : ""
}`,
initial: ["us-east-1", "us-west-2"].indexOf(existingIndex?.region),
initial: Object.values(SupportedBedrockKnowledgeBaseRegion).indexOf(
existingIndex?.region
),
},
{
type: "input",
Expand Down
19 changes: 19 additions & 0 deletions lib/shared/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,25 @@ export enum SupportedBedrockRegion {
US_WEST_2 = "us-west-2",
}

export enum SupportedBedrockKnowledgeBaseRegion {
AP_NORTHEAST_1 = "ap-northeast-1",
AP_NORTHEAST_2 = "ap-northeast-2",
AP_SOUTH_1 = "ap-south-1",
AP_SOUTHEAST_1 = "ap-southeast-1",
AP_SOUTHEAST_2 = "ap-southeast-2",
CA_CENTRAL_1 = "ca-central-1",
EU_CENTRAL_1 = "eu-central-1",
EU_CENTRAL_2 = "eu-central-2",
EU_NORTH_1 = "eu-north-1",
EU_WEST_1 = "eu-west-1",
EU_WEST_2 = "eu-west-2",
EU_WEST_3 = "eu-west-3",
US_EAST_1 = "us-east-1",
US_EAST_2 = "us-east-2",
US_WEST_2 = "us-west-2",
SA_EAST_1 = "sa-east-1",
}

export enum ModelInterface {
LangChain = "langchain",
MultiModal = "multimodal",
Expand Down