You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Note: Tavily is recommended for best results. Google Search requires manual verification on first use. Baidu and Bing are currently in beta and may return inaccurate results.
30
54
31
55
## 📱 Quick Download
32
56
@@ -36,11 +60,6 @@ across Android, iOS, and macOS platforms.
36
60
37
61
## Getting Started with Amazon Bedrock
38
62
39
-
### Prerequisites
40
-
41
-
Click [Amazon Bedrock Model access](https://console.aws.amazon.com/bedrock/home#/modelaccess) to enable your models
42
-
access.
43
-
44
63
### Configuration
45
64
46
65
You can choose one of the following two methods for configuration
@@ -62,16 +81,13 @@ You can choose one of the following two methods for configuration
62
81
<details>
63
82
<summary><b>🔧 Configure SwiftChat Server (Click to expand)</b></summary>
64
83
65
-
### Architecture
84
+
> **Note**: From v2.7.0, we recommend redeploying the SwiftChat Server for better performance with API Gateway + Lambda supporting 15-minute streaming output. Your existing API Key can be reused - you only need to update the Server URL in the app.
66
85
67
-

86
+
### Architecture
68
87
69
-
By default, we use **AWS App Runner**, which is commonly used to host Python FastAPI servers, offering high performance,
70
-
scalability and low latency.
88
+

71
89
72
-
Alternatively, we provide the option to replace App Runner with **AWS Lambda** using Function URL for a more
73
-
cost-effective
74
-
solution, as shown in
90
+
We use **API Gateway** combined with **AWS Lambda** to enable streaming responses for up to 15 minutes, as shown in
75
91
this [example](https://github.com/awslabs/aws-lambda-web-adapter/tree/main/examples/fastapi-response-streaming).
76
92
77
93
### Step 1: Set up your API Key
@@ -107,34 +123,28 @@ this [example](https://github.com/awslabs/aws-lambda-web-adapter/tree/main/examp
107
123
- ECR repository name (or use default: `swift-chat-api`)
108
124
- Image tag (please use default: `latest`)
109
125
- AWS region (the region you want to deploy, e.g.,: `us-east-1`)
2. Go to [CloudFormation Console](https://console.aws.amazon.com/cloudformation/home#/stacks/create/template?stackName=SwiftChatAPI) and select **Upload a template file** under **Specify template**, then upload the template file you downloaded. (Make sure you are in the same region where your API Key was created.)
125
137
126
138
3. Click **Next**, On the "Specify stack details" page, provide the following information:
127
-
-**Stack name**: Keep the default "SwiftChatAPI" or change if needed
128
139
-**ApiKeyParam**: Enter the parameter name you used for storing the API key (e.g., "SwiftChatAPIKey")
129
140
-**ContainerImageUri**: Enter the ECR image URI from Step 2 output
130
-
- For App Runner, choose an **InstanceTypeParam** based on your needs
131
141
132
142
4. Click **Next**, Keep the "Configure stack options" page as default, Read the Capabilities and Check the "I
133
143
acknowledge that AWS CloudFormation might create IAM resources" checkbox at the bottom.
134
144
5. Click **Next**, In the "Review and create" Review your configuration and click **Submit**.
135
145
136
146
Wait about 3–5 minutes for the deployment to finish, then click the CloudFormation stack and go to **Outputs** tab, you
137
-
can find the **API URL** which looks like: `https://xxx.xxx.awsapprunner.com` or `https://xxx.lambda-url.xxx.on.aws`
147
+
can find the **API URL** which looks like: `https://xxx.execute-api.us-east-1.amazonaws.com/v1`
138
148
139
149
### Step 4: Open the App and setup with API URL and API Key
140
150
@@ -258,20 +268,20 @@ can enable the **Use Proxy** option to forward your requests.
0 commit comments