Skip to content

Commit 4620652

Browse files
authored
feat: support open ai compatible models, optimize user experience (#21)
1 parent 2de9581 commit 4620652

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+2833
-1626
lines changed

README.md

+68-48
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,20 @@
1515

1616
SwiftChat is a fast and responsive AI chat application developed with [React Native](https://reactnative.dev/) and
1717
powered by [Amazon Bedrock](https://aws.amazon.com/bedrock/), with compatibility extending to other model providers such
18-
as Ollama, DeepSeek, and OpenAI. With its minimalist design philosophy and robust privacy protection, it delivers
19-
real-time streaming conversations and AI image generation capabilities across Android, iOS, and macOS platforms.
18+
as Ollama, DeepSeek, OpenAI and OpenAI Compatible. With its minimalist design philosophy and robust privacy protection,
19+
it delivers real-time streaming conversations and AI image generation capabilities across Android, iOS, and macOS
20+
platforms.
2021

21-
![](assets/promo.png)
22+
![](assets/promo.avif)
23+
24+
### What's New 🔥
25+
26+
- Support for OpenAI Compatible models. You can now
27+
use [easy-model-deployer](https://github.com/aws-samples/easy-model-deployer),
28+
OpenRouter, or any OpenAI-compatible model provider via SwiftChat. Please
29+
check [Configure OpenAI Compatible](#openai-compatible) section for more details(From v2.2.0).
30+
- Support for quick model switching (From v2.2.0).
31+
- Support regeneration of AI responses (From v2.2.0).
2232

2333
**Key Features:**
2434

@@ -31,52 +41,50 @@ real-time streaming conversations and AI image generation capabilities across An
3141
- Tablet-optimized for iPad and Android tablets
3242
- Fast launch and responsive performance
3343
- Multiple AI model
34-
supported ([Amazon Bedrock](https://aws.amazon.com/bedrock/), [Ollama](https://github.com/ollama/ollama), [DeepSeek](https://www.deepseek.com/)
35-
and [OpenAI](https://openai.com/), From v1.10.0 🎉)
36-
- Fully Customizable System Prompt Assistant (New feature from v1.9.0 🎉)
44+
supported ([Amazon Bedrock](https://aws.amazon.com/bedrock/), [Ollama](https://github.com/ollama/ollama), [DeepSeek](https://www.deepseek.com/), [OpenAI](https://openai.com/)
45+
and [OpenAI Compatible](#openai-compatible) Models)
46+
- Fully Customizable System Prompt Assistant
3747

38-
**Supported Features For Amazon Nova**
48+
**Supported Features For Amazon Nova series**
3949

40-
- Stream conversations with Amazon Nova Micro, Lite and Pro
41-
- Understand images, documents and videos with Nova Lite and Pro
4250
- Record 30-second videos directly on Android and iOS for Nova analysis
4351
- Upload large videos (1080p/4K) beyond 8MB with auto compression
4452
- Support using natural language to make Nova Canvas generate images, remove backgrounds, replace backgrounds, and
4553
create images in similar styles.
46-
- Support LaTeX formula rendering (inline and display modes) for Amazon Nova.
4754

4855
### Feature Showcase
4956

57+
#### YouTube Video
58+
59+
[<img src="./assets/youtube.avif">](https://www.youtube.com/watch?v=rey05WzfEbM)
60+
> The content in the video is an early version. For UI, architecture, and inconsistencies, please refer to the current
61+
> documentation.
62+
5063
**Comprehensive Multimodal Analysis**: Text, Image, Document and Video
5164

5265
<div style="display: flex; flex-direction: 'row'; background-color: #888888;">
53-
<img src="assets/avif/text_streaming.avif" width=24%>
54-
<img src="assets/avif/image_summary.avif" width=24%>
55-
<img src="assets/avif/doc_summary.avif" width=24%>
56-
<img src="assets/avif/video_summary.avif" width=24%>
66+
<img src="assets/animations/text_streaming.avif" width=24%>
67+
<img src="assets/animations/image_summary.avif" width=24%>
68+
<img src="assets/animations/doc_summary.avif" width=24%>
69+
<img src="assets/animations/video_summary.avif" width=24%>
5770
</div>
5871

59-
**System Prompt Assistant**: Useful Preset System Prompts with Full Management Capabilities (Add/Edit/Sort/Delete)
72+
**Creative Image Suite**: Generation, Style Replication, Background Removal & Replacement with Nova Canvas
6073

6174
<div style="display: flex; flex-direction: 'row'; background-color: #888888;">
62-
<img src="assets/avif/prompt_translate.avif" width=24%>
63-
<img src="assets/avif/prompt_code.avif" width=24%>
64-
<img src="assets/avif/prompt_add_chef.avif" width=24%>
65-
<img src="assets/avif/prompt_edit.avif" width=24%>
75+
<img src="assets/animations/gen_image.avif" width=24%>
76+
<img src="assets/animations/similar_style.avif" width=24%>
77+
<img src="assets/animations/remove_background.avif" width=24%>
78+
<img src="assets/animations/replace_background.avif" width=24%>
6679
</div>
6780

68-
**Creative Image Suite**: Generation, Style Replication, Background Removal & Replacement
81+
**System Prompt Assistant**: Useful Preset System Prompts with Full Management Capabilities (Add/Edit/Sort/Delete)
6982

70-
<div style="display: flex; flex-direction: 'row'; background-color: #888888;">
71-
<img src="assets/avif/gen_image.avif" width=24%>
72-
<img src="assets/avif/similar_style.avif" width=24%>
73-
<img src="assets/avif/remove_background.avif" width=24%>
74-
<img src="assets/avif/replace_background.avif" width=24%>
75-
</div>
83+
![](assets/animations/english_teacher.avif)
7684

7785
**Rich Markdown Support**: Paragraph, Code Blocks, Tables, LaTeX and More
7886

79-
![](assets/markdown.png)
87+
![](assets/markdown.avif)
8088

8189
We redesigned the UI with optimized font sizes and line spacing for a more elegant and clean presentation.
8290
All of these features are also seamlessly displayed on Android and macOS with native UI
@@ -86,7 +94,7 @@ All of these features are also seamlessly displayed on Android and macOS with na
8694
8795
## Architecture
8896

89-
![](/assets/architecture.png)
97+
![](/assets/architecture.avif)
9098

9199
By default, we use **AWS App Runner**, which is commonly used to host Python FastAPI servers, offering high performance,
92100
scalability and low latency.
@@ -177,6 +185,8 @@ Congratulations 🎉 Your SwiftChat App is ready to use!
177185

178186
## Getting Started with Other Model Providers
179187

188+
### Ollama
189+
180190
<details>
181191
<summary><b>🔧 Configure Ollama (Click to expand)</b></summary>
182192

@@ -190,6 +200,8 @@ Congratulations 🎉 Your SwiftChat App is ready to use!
190200

191201
</details>
192202

203+
### DeepSeek
204+
193205
<details>
194206
<summary><b>🔧 Configure DeepSeek (Click to expand)</b></summary>
195207

@@ -201,6 +213,8 @@ Congratulations 🎉 Your SwiftChat App is ready to use!
201213

202214
</details>
203215

216+
### OpenAI
217+
204218
<details>
205219
<summary><b>🔧 Configure OpenAI (Click to expand)</b></summary>
206220

@@ -215,43 +229,49 @@ the **Use Proxy** option to forward your requests.
215229

216230
</details>
217231

232+
### OpenAI Compatible
233+
234+
<details>
235+
<summary><b>🔧 Configure OpenAI Compatible models (Click to expand)</b></summary>
236+
237+
1. Navigate to the **Settings Page** and select the **OpenAI** tab.
238+
2. Under **OpenAI Compatible**, enter the following information:
239+
- `Base URL` of your model provider
240+
- `API Key` of your model provider
241+
- `Model ID` of the models you want to use (separate multiple models with commas)
242+
3. Select one of your models from the **Text Model** dropdown list.
243+
244+
</details>
245+
218246
## Detailed Features
219247

220-
**Quick Access Tools**: Code Copy, Selection Mode, Scroll Controls and Token Counter
248+
**Quick Access Tools**: Code & Content Copy, Selection Mode, Model Switch, Regenerate, Scroll Controls and Token Counter
221249

222250
<div style="display: flex; flex-direction: 'row'; background-color: #888888;">
223-
<img src="assets/avif/copy_code.avif" width=32%>
224-
<img src="assets/avif/select_mode.avif" width=32%>
225-
<img src="assets/avif/scroll_token.avif" width=32%>
251+
<img src="assets/animations/copy.avif" width=32%>
252+
<img src="assets/animations/regenerate.avif" width=32%>
253+
<img src="assets/animations/scroll_token.avif" width=32%>
226254
</div>
227255

228256
We feature streamlined chat History, Settings pages, and intuitive Usage statistics:
229257

230-
![](assets/history_settings.png)
231-
232-
Similarly, for the Mac version, we not only support the display of history, but also added a permanent sidebar
233-
display mode after v1.9.0, Below is a demo animation for how to add custom system prompt.
234-
235-
![](assets/avif/english_teacher.avif)
258+
![](assets/history_settings.avif)
236259

237260
### Message Handling
238261

239262
- [x] Text copy support:
240-
- Copy button in message header
263+
- Copy button at the bottom of messages, or directly click the model name or user title section.
241264
- Copy button in code blocks
242265
- Direct Select and copy code on macOS (double click or long click on iOS)
243266
- Long press text to copy entire sentence (Right-click on macOS)
244-
- [x] Text selection mode by tapping message title or double-clicking text
267+
- [x] Text selection mode by click selection button.
245268
- [x] Message timeline view in history
246269
- [x] Delete messages through long press in history
247-
- [x] Click to preview for uploaded documents and images
248-
- [x] Support Markdown format for both questions and answers
249-
- [x] Maximum 20 images and 5 documents per conversation
270+
- [x] Click to preview for documents videos and images
250271

251272
### Image Features
252273

253274
- [x] Support image generation with Chinese prompts(Make sure `Amazon Nova Lite` is enabled in your selected region)
254-
- [x] View and zoom generated images
255275
- [x] Long press images to save or share
256276
- [x] Automatic image compression to improve response speed
257277

@@ -261,15 +281,15 @@ display mode after v1.9.0, Below is a demo animation for how to add custom syste
261281
- [x] Support landscape mode on Android/iOS devices
262282
- [x] Double tap title bar to scroll to top
263283
- [x] Click bottom arrow to view latest messages
264-
- [x] View current session token usage by tapping Chat title
284+
- [x] Display system prompt and model switch icon again by clicking on the chat title
285+
- [x] View current session token usage by tapping twice Chat title
265286
- [x] Check detailed token usage and image generation count in Settings
266287
- [x] In-app upgrade notifications (Android & macOS)
267288

268289
We have optimized the layout for landscape mode. As shown below, you can comfortably view table/code contents in
269-
landscape
270-
orientation.
290+
landscape orientation.
271291

272-
![](assets/avif/landscape.avif)
292+
![](assets/animations/landscape.avif)
273293

274294
## What Makes SwiftChat Really "Swift"?
275295

0 commit comments

Comments
 (0)