3
3
# SwiftChat - A Cross-platform AI Chat App
4
4
5
5
SwiftChat is a fast and responsive AI chat application developed with [ React Native] ( https://reactnative.dev/ ) and
6
- powered by [ Amazon Bedrock] ( https://aws.amazon.com/bedrock/ ) . With its minimalist design philosophy and robust privacy
7
- protection, it delivers real-time streaming conversations and AI image generation capabilities across Android, iOS, and
8
- macOS platforms.
6
+ powered by [ Amazon Bedrock] ( https://aws.amazon.com/bedrock/ ) , with compatibility extending to other model providers such
7
+ as Ollama, DeepSeek, and OpenAI. With its minimalist design philosophy and robust privacy protection, it delivers
8
+ real-time streaming conversations and AI image generation capabilities across Android, iOS, and macOS platforms.
9
9
10
10
![ ] ( assets/promo.png )
11
11
@@ -19,7 +19,9 @@ macOS platforms.
19
19
- Cross-platform support (Android, iOS, macOS)
20
20
- Tablet-optimized for iPad and Android tablets
21
21
- Fast launch and responsive performance
22
- - Multiple AI model support and switching
22
+ - Multiple AI model
23
+ supported ([ Amazon Bedrock] ( https://aws.amazon.com/bedrock/ ) , [ Ollama] ( https://github.com/ollama/ollama ) , [ DeepSeek] ( https://www.deepseek.com/ )
24
+ and [ OpenAI] ( https://openai.com/ ) , From v1.10.0 🎉)
23
25
- Fully Customizable System Prompt Assistant (New feature from v1.9.0 🎉)
24
26
25
27
** Supported Features For Amazon Nova**
@@ -32,7 +34,6 @@ macOS platforms.
32
34
create images in similar styles.
33
35
- Support LaTeX formula rendering (inline and display modes) for Amazon Nova.
34
36
35
-
36
37
### Feature Showcase
37
38
38
39
** Comprehensive Multimodal Analysis** : Text, Image, Document and Video
@@ -69,7 +70,7 @@ macOS platforms.
69
70
We redesigned the UI with optimized font sizes and line spacing for a more elegant and clean presentation.
70
71
All of these features are also seamlessly displayed on Android and macOS with native UI
71
72
72
- > Note: Some animated images have been sped up for demonstration. If you experience lag, please view on Chrome, Firefox,
73
+ > Note: Some animated images have been sped up for demonstration. If you experience lag, please view on Chrome, Firefox,
73
74
> or Edge browser on your computer.
74
75
75
76
## Architecture
@@ -84,7 +85,7 @@ cost-effective
84
85
solution, as shown in
85
86
this [ example] ( https://github.com/awslabs/aws-lambda-web-adapter/tree/main/examples/fastapi-response-streaming ) .
86
87
87
- ## Getting Started
88
+ ## Getting Started with Amazon Bedrock
88
89
89
90
### Prerequisites
90
91
@@ -95,7 +96,8 @@ Ensure you have access to Amazon Bedrock foundation models. SwiftChat default se
95
96
- Image Model: ` Stable Diffusion 3.5 Large `
96
97
97
98
If you are using the image generation feature, please make sure you have enabled access to the ` Amazon Nova Lite ` model.
98
- Please follow the [ Amazon Bedrock User Guide] ( https://docs.aws.amazon.com/bedrock/latest/userguide/model-access-modify.html ) to
99
+ Please follow
100
+ the [ Amazon Bedrock User Guide] ( https://docs.aws.amazon.com/bedrock/latest/userguide/model-access-modify.html ) to
99
101
enable your models.
100
102
101
103
### Step 1: Set up your API Key
@@ -105,11 +107,11 @@ enable your models.
105
107
2 . Check whether you are in the [ supported region] ( #supported-region ) , then click on the ** Create parameter** button.
106
108
3 . Fill in the parameters below, leaving other options as default:
107
109
108
- - ** Name** : Enter a parameter name (e.g., "SwiftChatAPIKey", will be used as ` ApiKeyParam ` in Step 2).
110
+ - ** Name** : Enter a parameter name (e.g., "SwiftChatAPIKey", will be used as ` ApiKeyParam ` in Step 2).
109
111
110
- - ** Type** : Select ` SecureString `
112
+ - ** Type** : Select ` SecureString `
111
113
112
- - ** Value** : Enter any string without spaces.(this will be your ` API Key ` in Step 3)
114
+ - ** Value** : Enter any string without spaces.(this will be your ` API Key ` in Step 3)
113
115
114
116
4 . Click ** Create parameter** .
115
117
@@ -118,17 +120,17 @@ enable your models.
118
120
1 . Click one of the following buttons to launch the CloudFormation Stack in the same region where your API Key was
119
121
created.
120
122
121
- - ** App Runner**
123
+ - ** App Runner**
122
124
123
- [ ![ Launch Stack] ( assets/launch-stack.png )] ( https://console.aws.amazon.com/cloudformation/home#/stacks/create/template?stackName=SwiftChatAPI&templateURL=https://aws-gcr-solutions.s3.amazonaws.com/swift-chat/latest/SwiftChatAppRunner.template )
125
+ [ ![ Launch Stack] ( assets/launch-stack.png )] ( https://console.aws.amazon.com/cloudformation/home#/stacks/create/template?stackName=SwiftChatAPI&templateURL=https://aws-gcr-solutions.s3.amazonaws.com/swift-chat/latest/SwiftChatAppRunner.template )
124
126
125
- - ** Lambda** (Note: For AWS customer use only)
127
+ - ** Lambda** (Note: For AWS customer use only)
126
128
127
- [ ![ Launch Stack] ( 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 )
129
+ [ ![ Launch Stack] ( 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 )
128
130
129
131
2 . Click ** Next** , On the "Specify stack details" page, provide the following information:
130
- - Fill the ` ApiKeyParam ` with the parameter name you used for storing the API key (e.g., "SwiftChatAPIKey").
131
- - For App Runner, choose an ` InstanceTypeParam ` based on your needs.
132
+ - Fill the ` ApiKeyParam ` with the parameter name you used for storing the API key (e.g., "SwiftChatAPIKey").
133
+ - For App Runner, choose an ` InstanceTypeParam ` based on your needs.
132
134
3 . Click ** Next** , Keep the "Configure stack options" page as default, Read the Capabilities and Check the "I
133
135
acknowledge that AWS CloudFormation might create IAM resources" checkbox at the bottom.
134
136
4 . Click ** Next** , In the "Review and create" Review your configuration and click ** Submit** .
@@ -140,9 +142,9 @@ can find the **API URL** which looks like: `https://xxx.xxx.awsapprunner.com` or
140
142
141
143
1 . Download the App
142
144
143
- - Android App click to [ Download] ( https://github.com/aws-samples/swift-chat/releases/download/1.9.0/SwiftChat.apk )
144
- - macOS App click to [ Download] ( https://github.com/aws-samples/swift-chat/releases/download/1.9.0/SwiftChat.dmg )
145
- - iOS (Currently we do not provide the iOS version, you can build it locally with Xcode)
145
+ - Android App click to [ Download] ( https://github.com/aws-samples/swift-chat/releases/download/1.9.0/SwiftChat.apk )
146
+ - macOS App click to [ Download] ( https://github.com/aws-samples/swift-chat/releases/download/1.9.0/SwiftChat.dmg )
147
+ - iOS (Currently we do not provide the iOS version, you can build it locally with Xcode)
146
148
147
149
2 . Launch the App, open the drawer menu, and tap ** Settings** .
148
150
3 . Paste the ` API URL ` and ` API Key ` then select the Region.
@@ -164,6 +166,37 @@ Congratulations 🎉 Your SwiftChat App is ready to use!
164
166
- Europe (Paris): eu-west-3
165
167
- South America (São Paulo): sa-east-1
166
168
169
+ ## Getting Started with Other Model Providers
170
+
171
+ ### Configure Ollama
172
+
173
+ 1 . Navigate to the ** Settings Page** and select the ** Ollama** tab.
174
+ 2 . Enter your Ollama Server URL. For example:
175
+ ``` bash
176
+ http://localhost:11434
177
+ ```
178
+ 3. Once the correct Server URL is entered, you can select your desired Ollama models from the ** Text Model** dropdown
179
+ list.
180
+
181
+ # ## Configure DeepSeek
182
+
183
+ 1. Go to the ** Settings Page** and select the ** DeepSeek** tab.
184
+ 2. Input your DeepSeek API Key.
185
+ 3. Choose DeepSeek models from the ** Text Model** dropdown list. Currently, the following DeepSeek models are supported:
186
+ - ` DeepSeek-V3`
187
+ - ` DeepSeek-R1`
188
+
189
+ # ## Configure OpenAI
190
+
191
+ 1. Navigate to the ** Settings Page** and select the ** OpenAI** tab.
192
+ 2. Enter your OpenAI API Key.
193
+ 3. Select OpenAI models from the ** Text Model** dropdown list. The following OpenAI models are currently supported:
194
+ - ` GPT-4o`
195
+ - ` GPT-4o mini`
196
+
197
+ Additionally, if you have deployed the [ClickStream Server](# step-2-deploy-stack-and-get-your-api-url), you can enable
198
+ the ** Use Proxy** option to forward your requests.
199
+
167
200
# # Detailed Features
168
201
169
202
** Quick Access Tools** : Code Copy, Selection Mode, Scroll Controls and Token Counter
@@ -178,18 +211,18 @@ We feature streamlined chat History, Settings pages, and intuitive Usage statist
178
211
179
212
! [](assets/history_settings.png)
180
213
181
- Similarly, for the Mac version, we not only support the display of history, but also added a permanent sidebar
182
- display mode after v1.9.0.
214
+ Similarly, for the Mac version, we not only support the display of history, but also added a permanent sidebar
215
+ display mode after v1.9.0, Below is a demo animation for how to add custom system prompt .
183
216
184
- ![ ] ( assets/mac_ui.png )
217
+ ! [](assets/avif/english_teacher.avif )
185
218
186
219
# ## Message Handling
187
220
188
221
- [x] Text copy support:
189
- - Copy button in message header
190
- - Copy button in code blocks
191
- - Direct Select and copy code on macOS (double click or long click on iOS)
192
- - Long press text to copy entire sentence (Right-click on macOS)
222
+ - Copy button in message header
223
+ - Copy button in code blocks
224
+ - Direct Select and copy code on macOS (double click or long click on iOS)
225
+ - Long press text to copy entire sentence (Right-click on macOS)
193
226
- [x] Text selection mode by tapping message title or double-clicking text
194
227
- [x] Message timeline view in history
195
228
- [x] Delete messages through long press in history
@@ -214,13 +247,10 @@ display mode after v1.9.0.
214
247
- [x] Check detailed token usage and image generation count in Settings
215
248
- [x] In-app upgrade notifications (Android & macOS)
216
249
217
- We have optimized the layout for landscape mode. As shown below, you can comfortably view table contents in landscape
250
+ We have optimized the layout for landscape mode. As shown below, you can comfortably view table/code contents in
251
+ landscape
218
252
orientation.
219
253
220
- ![ ] ( assets/landscape.png )
221
-
222
- Similarly, for code that requires horizontal scrolling, rotate to landscape mode for better viewing.
223
-
224
254
! [](assets/avif/landscape.avif)
225
255
226
256
# # What Makes SwiftChat Really "Swift"?
@@ -276,16 +306,16 @@ npm run android
276
306
277
307
# ## Build for iOS
278
308
279
- also open a new terminal, for the first time you need to install the native dependencies
280
- by execute ` cd ios && pod install && cd .. ` , then execute the follow command:
309
+ also open a new terminal, for the first time you need to install the native dependencies
310
+ by execute ` cd ios && pod install && cd ..` , then execute the follow command:
281
311
282
312
` ` ` bash
283
313
npm run ios
284
314
` ` `
285
315
286
316
# ## Build for macOS
287
317
288
- 1 . Modify as ` isMac = true ` in ` /src/App.tsx ` and execute ` npm start ` .
318
+ 1. Execute ` npm start` .
289
319
2. Double click ` ios/SwiftChat.xcworkspace` to open the project in your Xcode.
290
320
3. Change the build destination to ` My Mac (Mac Catalyst)` then click the ▶ Run button.
291
321
0 commit comments