From 7a9ae8fbaa7ab0e59e1381160d4f60f66b6b8a6a Mon Sep 17 00:00:00 2001 From: Bigad Soleiman Date: Thu, 8 Feb 2024 11:37:49 +0000 Subject: [PATCH 1/2] Rename magic-create to magic-config --- cli/{magic-create.ts => magic-config.ts} | 4 ++-- cli/magic.ts | 4 ++-- docs/about/features.md | 2 +- ...ic-create-sample.gif => magic-config-sample.gif} | Bin docs/guide/deploy.md | 6 +++--- package.json | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) rename cli/{magic-create.ts => magic-config.ts} (98%) rename docs/guide/assets/{magic-create-sample.gif => magic-config-sample.gif} (100%) diff --git a/cli/magic-create.ts b/cli/magic-config.ts similarity index 98% rename from cli/magic-create.ts rename to cli/magic-config.ts index 558d2ab79..cadcb091c 100644 --- a/cli/magic-create.ts +++ b/cli/magic-config.ts @@ -99,7 +99,7 @@ const embeddingModels = [ function createConfig(config: any): void { fs.writeFileSync("./bin/config.json", JSON.stringify(config, undefined, 2)); - console.log("New config written to ./bin/config.json"); + console.log("Configuration written to ./bin/config.json"); } /** @@ -403,7 +403,7 @@ async function processCreateOptions(options: any): Promise { { type: "confirm", name: "create", - message: "Do you want to create a new config based on the above", + message: "Do you want to create/update the configuration based on the above settings", initial: true, }, ])) as any diff --git a/cli/magic.ts b/cli/magic.ts index e9c53ec89..dd978f05f 100644 --- a/cli/magic.ts +++ b/cli/magic.ts @@ -8,10 +8,10 @@ import { LIB_VERSION } from "./version.js"; let program = new Command(); program .version(LIB_VERSION) - .command("create", "๐Ÿ“ฆ creates a new configuration for the a Chatbot") + .command("config", "๐Ÿ“ฆ manage the chatbot configuration") .command("show", "๐Ÿšš display the current chatbot configuration") .command("deploy", "๐ŸŒŸ deploys the chatbot to your account") - .description("๐Ÿ› ๏ธ Easily create a chatbots"); + .description("๐Ÿ› ๏ธ Easily create a chatbot"); program.parse(process.argv); })(); diff --git a/docs/about/features.md b/docs/about/features.md index 6c00b303e..53b9f6623 100644 --- a/docs/about/features.md +++ b/docs/about/features.md @@ -28,7 +28,7 @@ To have the right instance types and how to request them, read [Amazon SageMaker > NOTE: Make sure to review [IDEFICS models license sections](https://huggingface.co/HuggingFaceM4/idefics-80b-instruct#license). To deploy a multimodal model, follow the [deploy instructions](../guide/deploy) -and select one of the supported models (press Space to select/deselect) from the magic-create CLI step and deploy as instructed in the above section. +and select one of the supported models (press Space to select/deselect) from the magic-config CLI step and deploy as instructed in the above section. > โš ๏ธ NOTE โš ๏ธ Amazon SageMaker are billed by the hour. Be aware of not letting this model run unused to avoid unnecessary costs. diff --git a/docs/guide/assets/magic-create-sample.gif b/docs/guide/assets/magic-config-sample.gif similarity index 100% rename from docs/guide/assets/magic-create-sample.gif rename to docs/guide/assets/magic-config-sample.gif diff --git a/docs/guide/deploy.md b/docs/guide/deploy.md index 022f617ab..2b97e38f4 100644 --- a/docs/guide/deploy.md +++ b/docs/guide/deploy.md @@ -97,7 +97,7 @@ See the documentation for more details [on environment resize](https://docs.aws. npm install && npm run build ``` -4. Once done, run the magic-create CLI to help you set up the solution with the features you care most: +4. Once done, run the magic-config CLI to help you set up the solution with the features you care most: ```bash npm run create @@ -109,11 +109,11 @@ You'll be prompted to configure the different aspects of the solution, such as: - Setup of the RAG system: engine selection (i.e. Aurora w/ pgvector, OpenSearch, Kendra..) embeddings selection and more to come. - Private Chatbot: Limit accessibility to website and backend to VPC. -When done, answer `Y` to create a new configuration. +When done, answer `Y` to create or update your configuration. ![sample](./assets/magic-create-sample.gif "CLI sample") -Your configuration is now stored under `bin/config.json`. You can re-run the magic-create command as needed to update your `config.json` +Your configuration is now stored under `bin/config.json`. You can re-run the magic-config command as needed to update your `config.json` 5. (Optional) Bootstrap AWS CDK on the target account and region diff --git a/package.json b/package.json index b1d250396..0055277d8 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "watch": "tsc -w", "cdk": "cdk", "gen": "npx @aws-amplify/cli codegen", - "create": "node ./cli/magic.js create", + "config": "node ./cli/magic.js config", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "format": "npx prettier --ignore-path .gitignore --write \"**/*.+(js|ts|jsx|tsx|json|css)\"", "deploy": "npm run format && npx cdk deploy", From 3837de7f948aea6a0bb46d639f828fd639fa9efd Mon Sep 17 00:00:00 2001 From: Bigad Soleiman Date: Thu, 8 Feb 2024 11:46:10 +0000 Subject: [PATCH 2/2] Update comments --- docs/documentation/private-chatbot.md | 4 ++-- lib/user-interface/private-website.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/documentation/private-chatbot.md b/docs/documentation/private-chatbot.md index e074c5903..49c7f9e53 100644 --- a/docs/documentation/private-chatbot.md +++ b/docs/documentation/private-chatbot.md @@ -1,6 +1,6 @@ # Private Chatbot -Allows the deployment of a private chatbot via the 'npm run create' CLI setup. +Allows the deployment of a private chatbot via the 'npm run config' CLI setup. - VPC only accessible website with an Application Load Balancer in front of an S3 hosted website. - Private Appsync APIs and Web Sockets @@ -13,7 +13,7 @@ Allows the deployment of a private chatbot via the 'npm run create' CLI setup. 1. [AWS Private CA issued ACM certificate](https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-private.html) for your chosen domain. (i.e. chatbot.example.org) 2. A Route 53 [Private Hosted Zone](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-private.html) (i.e. for example.org) -### During 'npm run create' +### During 'npm run config' ```shellsession $ โœ” Do you want to deploy a private website? I.e only accessible in VPC (Y/n) ยท true diff --git a/lib/user-interface/private-website.ts b/lib/user-interface/private-website.ts index e07a2d26d..c5ef5ac40 100644 --- a/lib/user-interface/private-website.ts +++ b/lib/user-interface/private-website.ts @@ -32,7 +32,7 @@ export class PrivateWebsite extends Construct { // PRIVATE WEBSITE // REQUIRES: - // 1. ACM Certificate ARN and Domain of website to be input during 'npm run create': + // 1. ACM Certificate ARN and Domain of website to be input during 'npm run config': // "privateWebsite" : true, // "certificate" : "arn:aws:acm:ap-southeast-2:1234567890:certificate/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX", // "domain" : "sub.example.com"