Skip to content

Commit

Permalink
feat: update readme format
Browse files Browse the repository at this point in the history
  • Loading branch information
zhu-xiaowei committed Nov 26, 2024
1 parent 35ddc1b commit f227a4e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ SwiftChat comes with the following default settings:

1. Right-click [Parameter Store](https://console.aws.amazon.com/systems-manager/parameters/) to open your AWS Console in
new window.
2. Check whether you are in the [supported region](#supported-region), then click on the "Create parameter" button.
3. Name: Enter a descriptive name for your parameter (e.g., "SwiftChatAPIKey", this is `ApiKeyParam` you will fill
2. Check whether you are in the [supported region](#supported-region), then click on the **Create parameter** button.
3. **Name**: Enter a descriptive name for your parameter (e.g., "SwiftChatAPIKey", this is `ApiKeyParam` you will fill
in [Step2](#step-2-deploy-stack-and-get-your-api-url)).
4. Tier: Select **Standard**.
5. Type: Select **SecureString**.
6. Value: Any string without spaces (This is the API Key you'll need to configure your App
4. **Tier**: Select `Standard`.
5. **Type**: Select `SecureString`.
6. **Value**: Any string without spaces (This is the API Key you'll need to configure your App
in [Step 3](#step-3-download-the-app-and-setup-with-api-url-and-api-key)).
7. Click "Create parameter".
7. Click **Create parameter**.

### Step 2: Deploy stack and get your API URL

Expand Down
25 changes: 13 additions & 12 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ SwiftChat 包含以下默认设置:
### 第1步: 设置API Key

1. 右键点击 [Parameter Store](https://console.aws.amazon.com/systems-manager/parameters/) 在新窗口中打开 AWS 控制台。
2. 检查您是否在 [支持的区域](#支持的区域),然后点击**创建参数**按钮。
3. 名称:为您的参数输入描述性名称(例如"SwiftChatAPIKey",这是您将在 [第2步](#第2步-部署堆栈并获取api-url)
2. 检查您是否在 [支持的区域](#支持的区域),然后点击 **创建参数** 按钮。
3. **名称**为您的参数输入描述性名称(例如"SwiftChatAPIKey",这是您将在 [第2步](#第2步-部署堆栈并获取api-url)
中填写的`ApiKeyParam`)。
4. 层级:选择 **标准**
5. 类型:选择 **SecureString**
6. 值:任何不含空格的字符串(这是您需要在 [第3步](#第3步-下载应用并设置-api-url-和-api-key) 中配置 App 的 API Key)。
7. 点击**创建参数**
4. **层级**:选择 `标准`
5. **类型**:选择 `SecureString`
6. ****任何不含空格的字符串(这是您需要在 [第3步](#第3步-下载应用并设置-api-url-和-api-key) 中配置 App 的 API Key)。
7. 点击 **创建参数**

### 第2步: 部署堆栈并获取API URL

Expand All @@ -65,13 +65,14 @@ SwiftChat 包含以下默认设置:

[![启动堆栈](assets/launch-stack.png)](https://console.aws.amazon.com/cloudformation/home#/stacks/create/template?stackName=SwiftChatLambda&templateURL=https://aws-gcr-solutions.s3.amazonaws.com/swift-chat/latest/SwiftChatLambda.template)

2. 点击**下一步**,在"指定堆栈详细信息"页面中提供以下信息:
2. 点击 **下一步**,在"指定堆栈详细信息"页面中提供以下信息:
- 使用存储 API Key 的参数名填写`ApiKeyParam`(例如"SwiftChatAPIKey")。
- 对于App Runner,根据您的需求选择`InstanceTypeParam`
3. 点击**下一步**,保持"配置堆栈选项"页面默认设置,阅读功能并勾选底部的"我确认,AWS CloudFormation可能会创建 IAM 资源"复选框。
4. 点击**下一步**,在"审核并创建"中检查配置并点击**提交**
3. 点击 **下一步**,保持 "配置堆栈选项" 页面默认设置,阅读功能并勾选底部的 "我确认,AWS CloudFormation可能会创建 IAM 资源"
复选框。
4. 点击 **下一步**,在 "审核并创建" 中检查配置并点击 **提交**

等待约3-5分钟部署完成,然后点击CloudFormation堆栈并转到**输出**选项卡,您可以找到**API URL**
等待约3-5分钟部署完成,然后点击CloudFormation堆栈并转到 **输出** 选项卡,您可以找到 **API URL**
类似`https://xxx.xxx.awsapprunner.com``https://xxx.lambda-url.xxx.on.aws`

### 第3步: 下载应用并设置 API URL 和 API Key
Expand All @@ -81,9 +82,9 @@ SwiftChat 包含以下默认设置:
- macOS 应用点击 [下载](https://github.com/aws-samples/swift-chat/releases/download/1.5.0/SwiftChat.dmg)
- iOS (目前不提供 iOS 版本,您可以使用 Xcode 在本地构建)

2. 启动应用,点击左侧菜单按钮打开抽屉页面,点击抽屉底部的**Settings**
2. 启动应用,点击左侧菜单按钮打开抽屉页面,点击抽屉底部的 **Settings**
3. 粘贴`API URL``API Key`然后选择 Region。
4. 您可以更改默认的文本和图像模型,**确保已在 AWS 控制台的对应 Region 中启用了这些模型**
4. 您可以更改默认的文本和图像模型,**并确保已在 AWS 控制台的对应 Region 中启用了这些模型**
5. 点击右上角✓图标保存配置并开始聊天。

恭喜🎉 您的 SwiftChat 应用已准备就绪!
Expand Down

0 comments on commit f227a4e

Please sign in to comment.