Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support image, document, and video understanding for Amazon Nova #7

Merged
merged 7 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,20 @@ macOS platforms.

- Real-time streaming chat with AI
- AI image generation with progress
- Multimodal support (camera, photos & documents)
- Multimodal support (images, videos & documents)
- Conversation history list view and management
- Cross-platform support (Android, iOS, macOS)
- Tablet-optimized for iPad and Android tablets
- Fast launch and responsive performance
- Multiple AI model support and switching

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

- Stream conversations with Amazon Nova Micro, Lite and Pro
- Understand images, documents and videos with Nova Lite and Pro
- Record 30-second videos directly on Android and iOS for Nova analysis
- Upload large videos (1080p/4K) beyond 8MB with auto compression

## Architecture

![](/assets/architecture.png)
Expand Down Expand Up @@ -85,8 +92,8 @@ can find the **API URL** which looks like: `https://xxx.xxx.awsapprunner.com` or
### Step 3: Download the app and setup with API URL and API Key

1. Download the App
- Android App click to [Download](https://github.com/aws-samples/swift-chat/releases/download/1.5.0/SwiftChat.apk)
- macOS App click to [Download](https://github.com/aws-samples/swift-chat/releases/download/1.5.0/SwiftChat.dmg)
- Android App click to [Download](https://github.com/aws-samples/swift-chat/releases/download/1.6.0/SwiftChat.apk)
- macOS App click to [Download](https://github.com/aws-samples/swift-chat/releases/download/1.6.0/SwiftChat.dmg)
- iOS (Currently we do not provide the iOS version, you can build it locally with Xcode)

2. Launch the App, open the drawer menu, and tap **Settings**.
Expand Down
11 changes: 9 additions & 2 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ macOS 等多个平台。
- 快速启动和响应性能
- 支持多种 AI 模型及切换

**Amazon Nova 新功能 🎉🎉🎉**

- 支持与 Amazon Nova Micro、Lite 和 Pro 进行流式对话
- 支持 Nova Lite 和 Pro 对图片、文档及视频内容的理解
- 支持直接在安卓和 iOS 设备上录制最长 30 秒的视频供 Nova 分析
- 支持自动压缩上传超过8MB的高清视频(1080p/4K)

## 架构

![](/assets/architecture.png)
Expand Down Expand Up @@ -76,8 +83,8 @@ macOS 等多个平台。
### 第3步: 下载应用并设置 API URL 和 API Key

1. 下载应用
- Android 应用点击 [下载](https://github.com/aws-samples/swift-chat/releases/download/1.5.0/SwiftChat.apk)
- macOS 应用点击 [下载](https://github.com/aws-samples/swift-chat/releases/download/1.5.0/SwiftChat.dmg)
- Android 应用点击 [下载](https://github.com/aws-samples/swift-chat/releases/download/1.6.0/SwiftChat.apk)
- macOS 应用点击 [下载](https://github.com/aws-samples/swift-chat/releases/download/1.6.0/SwiftChat.dmg)
- iOS (目前不提供 iOS 版本,您可以使用 Xcode 在本地构建)

2. 启动应用,点击左侧菜单按钮,并点击底部的 **Settings**。
Expand Down
4 changes: 2 additions & 2 deletions react-native/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ android {
applicationId "com.aws.swiftchat"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 10
versionName "1.5.0"
versionCode 11
versionName "1.6.0"
ndk {
//noinspection ChromeOsAbiSupport
abiFilters 'arm64-v8a'
Expand Down
12 changes: 6 additions & 6 deletions react-native/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ PODS:
- React-Mapbuffer (0.74.1):
- glog
- React-debug
- react-native-compressor (1.9.0):
- react-native-compressor (1.10.1):
- DoubleConversion
- glog
- hermes-engine
Expand Down Expand Up @@ -982,7 +982,7 @@ PODS:
- Yoga
- react-native-get-random-values (1.11.0):
- React-Core
- react-native-image-picker (7.1.2):
- react-native-image-picker (7.2.2):
- DoubleConversion
- glog
- hermes-engine
Expand Down Expand Up @@ -1330,7 +1330,7 @@ PODS:
- Yoga
- RNShare (10.2.1):
- React-Core
- RNSVG (15.4.0):
- RNSVG (15.10.1):
- React-Core
- SocketRocket (0.7.0)
- Yoga (0.0.0)
Expand Down Expand Up @@ -1588,10 +1588,10 @@ SPEC CHECKSUMS:
React-jsitracing: 233d1a798fe0ff33b8e630b8f00f62c4a8115fbc
React-logger: 7e7403a2b14c97f847d90763af76b84b152b6fce
React-Mapbuffer: 11029dcd47c5c9e057a4092ab9c2a8d10a496a33
react-native-compressor: 6e5044b1c065421bcc2bfb89579ab30f51803e9a
react-native-compressor: 2ae9013718fb351264fcfcdf232eccbbf3d280a2
react-native-document-picker: c4f197741c327270453aa9840932098e0064fd52
react-native-get-random-values: 21325b2244dfa6b58878f51f9aa42821e7ba3d06
react-native-image-picker: c3afe5472ef870d98a4b28415fc0b928161ee5f7
react-native-image-picker: dd85e2530d366acf77745830b053294afed66339
react-native-mmkv: 8c9a677e64a1ac89b0c6cf240feea528318b3074
react-native-safe-area-context: b7daa1a8df36095a032dff095a1ea8963cb48371
React-nativeconfig: b0073a590774e8b35192fead188a36d1dca23dec
Expand Down Expand Up @@ -1625,7 +1625,7 @@ SPEC CHECKSUMS:
RNReanimated: f4ff116e33e0afc3d127f70efe928847c7c66355
RNScreens: 5aeecbb09aa7285379b6e9f3c8a3c859bb16401c
RNShare: 0fad69ae2d71de9d1f7b9a43acf876886a6cb99c
RNSVG: cb24fb322de8c1ebf59904e7aca0447bb8dbed5a
RNSVG: 7ff26379b2d1871b8571e6f9bc9630de6baf9bdf
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
Yoga: 348f8b538c3ed4423eb58a8e5730feec50bce372

Expand Down
8 changes: 4 additions & 4 deletions react-native/ios/SwiftChat.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@
CODE_SIGN_ENTITLEMENTS = SwiftChat/SwiftChat.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 10;
CURRENT_PROJECT_VERSION = 11;
DEVELOPMENT_TEAM = BUA6W9H7T3;
ENABLE_BITCODE = NO;
"ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES;
Expand All @@ -497,7 +497,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.5.0;
MARKETING_VERSION = 1.6.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -526,7 +526,7 @@
CODE_SIGN_ENTITLEMENTS = SwiftChat/SwiftChat.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 10;
CURRENT_PROJECT_VERSION = 11;
DEVELOPMENT_TEAM = BUA6W9H7T3;
"ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES;
INFOPLIST_FILE = SwiftChat/Info.plist;
Expand All @@ -537,7 +537,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.5.0;
MARKETING_VERSION = 1.6.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down
4 changes: 3 additions & 1 deletion react-native/ios/SwiftChat/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@
<true/>
</dict>
<key>NSCameraUsageDescription</key>
<string>Support take camera and summarize it</string>
<string>Support take photos and summarize it</string>
<key>NSMicrophoneUsageDescription</key>
<string>Support record videos and summarize it</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Support choose pictures and summarize it</string>
<key>UILaunchStoryboardName</key>
Expand Down
1 change: 1 addition & 0 deletions react-native/ios/SwiftChat/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>3B52.1</string>
<string>C617.1</string>
</array>
</dict>
Expand Down
60 changes: 40 additions & 20 deletions react-native/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "swift-chat",
"description": "Sample Bedrock Cross-platform App - SwiftChat",
"version": "1.5.0",
"version": "1.6.0",
"private": true,
"scripts": {
"android": "react-native run-android",
Expand All @@ -19,7 +19,7 @@
"react": "18.2.0",
"react-native": "0.74.1",
"react-native-code-highlighter": "^1.2.2",
"react-native-compressor": "^1.9.0",
"react-native-compressor": "^1.10.1",
"react-native-dialog": "^9.3.0",
"react-native-document-picker": "^9.3.1",
"react-native-element-dropdown": "^2.12.1",
Expand All @@ -30,11 +30,12 @@
"react-native-get-random-values": "^1.11.0",
"react-native-gifted-chat": "^2.4.0",
"react-native-haptic-feedback": "^2.2.0",
"react-native-image-picker": "^7.1.2",
"react-native-image-picker": "^7.2.2",
"react-native-image-viewing": "^0.2.2",
"react-native-marked": "^6.0.4",
"react-native-mmkv": "^2.12.2",
"react-native-polyfill-globals": "^3.1.0",
"react-native-progress": "^5.0.1",
"react-native-reanimated": "^3.14.0",
"react-native-safe-area-context": "^4.10.8",
"react-native-screens": "^3.32.0",
Expand Down
Binary file added react-native/src/assets/play.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading