Skip to content

Commit

Permalink
feat: support system prompt (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhu-xiaowei authored Jan 14, 2025
1 parent d3d34d1 commit 44a7e6b
Show file tree
Hide file tree
Showing 39 changed files with 1,382 additions and 458 deletions.
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ macOS platforms.
- Tablet-optimized for iPad and Android tablets
- Fast launch and responsive performance
- Multiple AI model support and switching
- Fully Customizable System Prompt Assistant (New feature from v1.9.0 🎉)

**New Features For Amazon Nova 🎉🎉🎉**
**Supported Features For Amazon Nova**

- Stream conversations with Amazon Nova Micro, Lite and Pro
- Understand images, documents and videos with Nova Lite and Pro
Expand All @@ -43,6 +44,15 @@ macOS platforms.
<img src="assets/avif/video_summary.avif" width=24%>
</div>

**System Prompt Assistant**: Useful Preset System Prompts with Full Management Capabilities (Add/Edit/Sort/Delete)

<div style="display: flex; flex-direction: 'row'; background-color: #888888;">
<img src="assets/avif/prompt_translate.avif" width=24%>
<img src="assets/avif/prompt_code.avif" width=24%>
<img src="assets/avif/prompt_add_chef.avif" width=24%>
<img src="assets/avif/prompt_edit.avif" width=24%>
</div>

**Creative Image Suite**: Generation, Style Replication, Background Removal & Replacement

<div style="display: flex; flex-direction: 'row'; background-color: #888888;">
Expand Down Expand Up @@ -82,7 +92,7 @@ Ensure you have access to Amazon Bedrock foundation models. SwiftChat default se

- Region: `us-west-2`
- Text Model: `Amazon Nova Pro`
- Image Model: `Stable Image Core 1.0`
- Image Model: `Stable Diffusion 3.5 Large`

If you are using the image generation feature, please make sure you have enabled access to the `Amazon Nova Lite` model.
Please follow the [Amazon Bedrock User Guide](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access-modify.html) to
Expand Down Expand Up @@ -168,6 +178,11 @@ We feature streamlined chat History, Settings pages, and intuitive Usage statist

![](assets/history_settings.png)

Similarly, for the Mac version, we not only support the display of history, but also added a permanent sidebar
display mode after v1.9.0.

![](assets/mac_ui.png)

### Message Handling

- [x] Text copy support:
Expand Down
20 changes: 18 additions & 2 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ macOS 等多个平台。

- 与 AI 进行实时流式聊天
- 支持丰富的 Markdown 渲染:表格、代码块、LaTeX 公式等
- 可实现完全自定义的系统提示词助手
- 带进度的 AI 图像生成
- 多模态支持(相机拍照、图片选择和文档上传)
- 对话历史记录列表查看和管理
- 跨平台支持(Android、iOS、macOS)
- 针对 iPad 和 Android 平板电脑进行 UI 优化
- 快速启动和响应性能
- 支持多种 AI 模型及切换
- 支持完全自定义的系统提示词助手 (v1.9.0 的新功能 🎉)

**Amazon Nova 新功能 🎉🎉🎉**
**Amazon Nova 功能支持**

- 支持与 Amazon Nova Micro、Lite 和 Pro 进行流式对话
- 支持 Nova Lite 和 Pro 对图片、文档及视频内容的理解
Expand All @@ -40,6 +42,16 @@ macOS 等多个平台。
<img src="assets/avif/video_summary.avif" width=24%>
</div>


**系统提示词助手**: 提供实用的内置系统提示词,同时支持添加、编辑、排序和删除系统提示词来构建你自己的助手

<div style="display: flex; flex-direction: 'row'; background-color: #888888;">
<img src="assets/avif/prompt_translate.avif" width=24%>
<img src="assets/avif/prompt_code.avif" width=24%>
<img src="assets/avif/prompt_add_chef.avif" width=24%>
<img src="assets/avif/prompt_edit.avif" width=24%>
</div>

**图像创作助手**:图像生成、风格复制、背景移除与替换

<div style="display: flex; flex-direction: 'row'; background-color: #888888;">
Expand Down Expand Up @@ -75,7 +87,7 @@ macOS 等多个平台。

- 区域: `us-west-2`
- 文本模型: `Amazon Nova Pro`
- 图像模型: `Stable Image Core 1.0`
- 图像模型: `Stable Diffusion 3.5 Large`

如果您要使用图片生成功能,请确保已开启 `Amazon Nova Lite` 模型的访问权限。您可以参考 [Amazon Bedrock 用户指南](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access-modify.html)
来启用您的模型。
Expand Down Expand Up @@ -154,6 +166,10 @@ macOS 等多个平台。

![](assets/history_settings_zh.png)

对于 Mac 版本,我们不仅支持历史记录的显示,还在 1.9.0 版本后添加了侧边栏固定显示模式。

![](assets/mac_ui.png)

### 消息处理

- [x] 文本复制支持:
Expand Down
Binary file added assets/avif/prompt_add_chef.avif
Binary file not shown.
Binary file added assets/avif/prompt_code.avif
Binary file not shown.
Binary file added assets/avif/prompt_edit.avif
Binary file not shown.
Binary file added assets/avif/prompt_translate.avif
Binary file not shown.
Binary file added assets/mac_ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions react-native/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ module.exports = {
'prettier',
'@react-native',
],
ignorePatterns: ['android/**', 'ios/**'],
};
4 changes: 2 additions & 2 deletions react-native/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- RNScreens (3.32.0):
- RNScreens (4.4.0):
- DoubleConversion
- glog
- hermes-engine
Expand Down Expand Up @@ -1623,7 +1623,7 @@ SPEC CHECKSUMS:
RNGestureHandler: 8dbcccada4a7e702e7dec9338c251b1cf393c960
RNReactNativeHapticFeedback: ec56a5f81c3941206fd85625fa669ffc7b4545f9
RNReanimated: f4ff116e33e0afc3d127f70efe928847c7c66355
RNScreens: 5aeecbb09aa7285379b6e9f3c8a3c859bb16401c
RNScreens: 024c5cb8569dea6667b5c73e6c119beb83f686f0
RNShare: 0fad69ae2d71de9d1f7b9a43acf876886a6cb99c
RNSVG: 7ff26379b2d1871b8571e6f9bc9630de6baf9bdf
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
Expand Down
2 changes: 1 addition & 1 deletion react-native/ios/SwiftChat/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>SwiftChat</string>
<string></string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
Expand Down
Loading

0 comments on commit 44a7e6b

Please sign in to comment.