diff --git a/cli/magic-config.ts b/cli/magic-config.ts index d8c3adbe4..74aa02710 100644 --- a/cli/magic-config.ts +++ b/cli/magic-config.ts @@ -11,6 +11,7 @@ import { SystemConfig, SupportedBedrockRegion, ModelConfig, + SupportedBedrockKnowledgeBaseRegion, } from "../lib/shared/types"; import { LIB_VERSION } from "./version.js"; import * as fs from "fs"; @@ -787,11 +788,13 @@ async function processCreateOptions(options: any): Promise { 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", diff --git a/lib/shared/types.ts b/lib/shared/types.ts index 99e47ea6d..bb802ca8c 100644 --- a/lib/shared/types.ts +++ b/lib/shared/types.ts @@ -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",