local llm supported

This commit is contained in:
gcw_4spBpAfv
2026-03-05 13:55:57 +08:00
parent 1701ecfb7f
commit bd07a7526a
43 changed files with 4258 additions and 115 deletions

View File

@@ -5,7 +5,7 @@ plugins {
android {
namespace 'com.digitalperson'
compileSdk 33
compileSdk 34
buildFeatures {
buildConfig true
@@ -24,6 +24,11 @@ android {
}
}
// 不压缩大文件,避免内存不足错误
aaptOptions {
noCompress 'rknn', 'rkllm', 'onnx', 'model', 'bin', 'json'
}
defaultConfig {
applicationId "com.digitalperson"
minSdk 21
@@ -40,7 +45,7 @@ android {
buildConfigField "String", "LLM_API_URL", "\"${(project.findProperty('LLM_API_URL') ?: 'https://ark.cn-beijing.volces.com/api/v3/chat/completions').toString()}\""
buildConfigField "String", "LLM_API_KEY", "\"${(project.findProperty('LLM_API_KEY') ?: '').toString()}\""
buildConfigField "String", "LLM_MODEL", "\"${(project.findProperty('LLM_MODEL') ?: 'doubao-1-5-pro-32k-character-250228').toString()}\""
buildConfigField "boolean", "USE_LIVE2D", "${(project.findProperty('USE_LIVE2D') ?: 'false').toString()}"
buildConfigField "boolean", "USE_LIVE2D", "${(project.findProperty('USE_LIVE2D') ?: 'true').toString()}"
ndk {
abiFilters "arm64-v8a"
@@ -63,6 +68,8 @@ android {
}
dependencies {
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.9.0'
@@ -73,6 +80,15 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
// ExoPlayer for video playback (used to show silent / speaking videos)
implementation 'com.google.android.exoplayer:exoplayer:2.18.6'
implementation 'androidx.camera:camera-core:1.3.4'
implementation 'androidx.camera:camera-camera2:1.3.4'
implementation 'androidx.camera:camera-lifecycle:1.3.4'
implementation 'androidx.camera:camera-view:1.3.4'
implementation project(':framework')
implementation files('../Live2DFramework/Core/android/Live2DCubismCore.aar')
// Tencent Cloud TTS SDK
implementation files('libs/realtime_tts-release-v2.0.16-20260128-d80cafe.aar')
implementation 'com.google.code.gson:gson:2.8.9'
implementation 'com.squareup.okhttp3:okhttp:4.9.3'
}