llama: update the app's package name and namespace
This commit is contained in:
parent
56e83b723b
commit
8897b78055
|
|
@ -8,11 +8,11 @@ plugins {
|
|||
}
|
||||
|
||||
android {
|
||||
namespace = "com.example.llama"
|
||||
namespace = "com.arm.aiplayground"
|
||||
compileSdk = 36
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.example.llama"
|
||||
applicationId = "com.arm.aiplayground"
|
||||
|
||||
minSdk = 33
|
||||
targetSdk = 36
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama
|
||||
package com.arm.aiplayground
|
||||
|
||||
import android.app.Application
|
||||
import dagger.hilt.android.HiltAndroidApp
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama
|
||||
package com.arm.aiplayground
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.ActivityNotFoundException
|
||||
|
|
@ -32,31 +32,31 @@ import androidx.navigation.compose.rememberNavController
|
|||
import androidx.navigation.navArgument
|
||||
import com.arm.aichat.InferenceEngine.State
|
||||
import com.arm.aichat.isUninterruptible
|
||||
import com.example.llama.engine.ModelLoadingMetrics
|
||||
import com.example.llama.navigation.AppDestinations
|
||||
import com.example.llama.navigation.NavigationActions
|
||||
import com.example.llama.ui.scaffold.AnimatedNavHost
|
||||
import com.example.llama.ui.scaffold.AppNavigationDrawer
|
||||
import com.example.llama.ui.scaffold.AppScaffold
|
||||
import com.example.llama.ui.scaffold.ScaffoldConfig
|
||||
import com.example.llama.ui.scaffold.ScaffoldEvent
|
||||
import com.example.llama.ui.scaffold.bottombar.BottomBarConfig
|
||||
import com.example.llama.ui.scaffold.topbar.NavigationIcon
|
||||
import com.example.llama.ui.scaffold.topbar.TopBarConfig
|
||||
import com.example.llama.ui.screens.BenchmarkScreen
|
||||
import com.example.llama.ui.screens.ConversationScreen
|
||||
import com.example.llama.ui.screens.ModelLoadingScreen
|
||||
import com.example.llama.ui.screens.ModelsScreen
|
||||
import com.example.llama.ui.screens.SettingsGeneralScreen
|
||||
import com.example.llama.ui.theme.LlamaTheme
|
||||
import com.example.llama.viewmodel.BenchmarkViewModel
|
||||
import com.example.llama.viewmodel.ConversationViewModel
|
||||
import com.example.llama.viewmodel.MainViewModel
|
||||
import com.example.llama.viewmodel.ModelLoadingViewModel
|
||||
import com.example.llama.viewmodel.ModelScreenUiMode
|
||||
import com.example.llama.viewmodel.ModelsManagementViewModel
|
||||
import com.example.llama.viewmodel.ModelsViewModel
|
||||
import com.example.llama.viewmodel.SettingsViewModel
|
||||
import com.arm.aiplayground.engine.ModelLoadingMetrics
|
||||
import com.arm.aiplayground.navigation.AppDestinations
|
||||
import com.arm.aiplayground.navigation.NavigationActions
|
||||
import com.arm.aiplayground.ui.scaffold.AnimatedNavHost
|
||||
import com.arm.aiplayground.ui.scaffold.AppNavigationDrawer
|
||||
import com.arm.aiplayground.ui.scaffold.AppScaffold
|
||||
import com.arm.aiplayground.ui.scaffold.ScaffoldConfig
|
||||
import com.arm.aiplayground.ui.scaffold.ScaffoldEvent
|
||||
import com.arm.aiplayground.ui.scaffold.bottombar.BottomBarConfig
|
||||
import com.arm.aiplayground.ui.scaffold.topbar.NavigationIcon
|
||||
import com.arm.aiplayground.ui.scaffold.topbar.TopBarConfig
|
||||
import com.arm.aiplayground.ui.screens.BenchmarkScreen
|
||||
import com.arm.aiplayground.ui.screens.ConversationScreen
|
||||
import com.arm.aiplayground.ui.screens.ModelLoadingScreen
|
||||
import com.arm.aiplayground.ui.screens.ModelsScreen
|
||||
import com.arm.aiplayground.ui.screens.SettingsGeneralScreen
|
||||
import com.arm.aiplayground.ui.theme.LlamaTheme
|
||||
import com.arm.aiplayground.viewmodel.BenchmarkViewModel
|
||||
import com.arm.aiplayground.viewmodel.ConversationViewModel
|
||||
import com.arm.aiplayground.viewmodel.MainViewModel
|
||||
import com.arm.aiplayground.viewmodel.ModelLoadingViewModel
|
||||
import com.arm.aiplayground.viewmodel.ModelScreenUiMode
|
||||
import com.arm.aiplayground.viewmodel.ModelsManagementViewModel
|
||||
import com.arm.aiplayground.viewmodel.ModelsViewModel
|
||||
import com.arm.aiplayground.viewmodel.SettingsViewModel
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
package com.example.llama.data.db
|
||||
package com.arm.aiplayground.data.db
|
||||
|
||||
import android.content.Context
|
||||
import androidx.room.Database
|
||||
import androidx.room.Room
|
||||
import androidx.room.RoomDatabase
|
||||
import com.example.llama.data.db.dao.ModelDao
|
||||
import com.example.llama.data.db.dao.SystemPromptDao
|
||||
import com.example.llama.data.db.entity.ModelEntity
|
||||
import com.example.llama.data.db.entity.SystemPromptEntity
|
||||
import com.arm.aiplayground.data.db.dao.ModelDao
|
||||
import com.arm.aiplayground.data.db.dao.SystemPromptDao
|
||||
import com.arm.aiplayground.data.db.entity.ModelEntity
|
||||
import com.arm.aiplayground.data.db.entity.SystemPromptEntity
|
||||
import javax.inject.Singleton
|
||||
|
||||
/**
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package com.example.llama.data.db.converter
|
||||
package com.arm.aiplayground.data.db.converter
|
||||
|
||||
import androidx.room.TypeConverter
|
||||
import com.example.llama.data.model.GgufMetadata
|
||||
import com.arm.aiplayground.data.model.GgufMetadata
|
||||
import kotlinx.serialization.json.Json
|
||||
|
||||
class GgufMetadataConverters {
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
package com.example.llama.data.db.dao
|
||||
package com.arm.aiplayground.data.db.dao
|
||||
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Delete
|
||||
import androidx.room.Insert
|
||||
import androidx.room.OnConflictStrategy
|
||||
import androidx.room.Query
|
||||
import com.example.llama.data.db.entity.ModelEntity
|
||||
import com.arm.aiplayground.data.db.entity.ModelEntity
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
@Dao
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
package com.example.llama.data.db.dao
|
||||
package com.arm.aiplayground.data.db.dao
|
||||
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Delete
|
||||
import androidx.room.Insert
|
||||
import androidx.room.OnConflictStrategy
|
||||
import androidx.room.Query
|
||||
import com.example.llama.data.db.entity.SystemPromptEntity
|
||||
import com.arm.aiplayground.data.db.entity.SystemPromptEntity
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
/**
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
package com.example.llama.data.db.entity
|
||||
package com.arm.aiplayground.data.db.entity
|
||||
|
||||
import androidx.room.Entity
|
||||
import androidx.room.PrimaryKey
|
||||
import androidx.room.TypeConverters
|
||||
import com.example.llama.data.db.converter.GgufMetadataConverters
|
||||
import com.example.llama.data.model.ModelInfo
|
||||
import com.example.llama.data.model.GgufMetadata
|
||||
import com.arm.aiplayground.data.db.converter.GgufMetadataConverters
|
||||
import com.arm.aiplayground.data.model.ModelInfo
|
||||
import com.arm.aiplayground.data.model.GgufMetadata
|
||||
|
||||
|
||||
@Entity(tableName = "models")
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package com.example.llama.data.db.entity
|
||||
package com.arm.aiplayground.data.db.entity
|
||||
|
||||
import androidx.room.Entity
|
||||
import androidx.room.PrimaryKey
|
||||
import com.example.llama.data.model.SystemPrompt
|
||||
import com.arm.aiplayground.data.model.SystemPrompt
|
||||
|
||||
/**
|
||||
* Database entity for storing system prompts.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.data.model
|
||||
package com.arm.aiplayground.data.model
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import com.arm.aichat.gguf.GgufMetadata as Domain
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package com.example.llama.data.model
|
||||
package com.arm.aiplayground.data.model
|
||||
|
||||
import com.arm.aichat.gguf.FileType
|
||||
import com.example.llama.util.formatContextLength
|
||||
import com.example.llama.util.formatFileByteSize
|
||||
import com.arm.aiplayground.util.formatContextLength
|
||||
import com.arm.aiplayground.util.formatFileByteSize
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.data.model
|
||||
package com.arm.aiplayground.data.model
|
||||
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.data.repo
|
||||
package com.arm.aiplayground.data.repo
|
||||
|
||||
import android.content.Context
|
||||
import android.net.Uri
|
||||
|
|
@ -6,19 +6,19 @@ import android.os.StatFs
|
|||
import android.util.Log
|
||||
import com.arm.aichat.gguf.GgufMetadataReader
|
||||
import com.arm.aichat.gguf.InvalidFileFormatException
|
||||
import com.example.llama.data.db.dao.ModelDao
|
||||
import com.example.llama.data.db.entity.ModelEntity
|
||||
import com.example.llama.data.model.GgufMetadata
|
||||
import com.example.llama.data.model.ModelInfo
|
||||
import com.example.llama.data.repo.ModelRepository.ImportProgressTracker
|
||||
import com.example.llama.data.source.local.LocalFileDataSource
|
||||
import com.example.llama.data.source.remote.HuggingFaceDownloadInfo
|
||||
import com.example.llama.data.source.remote.HuggingFaceModel
|
||||
import com.example.llama.data.source.remote.HuggingFaceModelDetails
|
||||
import com.example.llama.data.source.remote.HuggingFaceRemoteDataSource
|
||||
import com.example.llama.monitoring.MemoryMetrics
|
||||
import com.example.llama.monitoring.StorageMetrics
|
||||
import com.example.llama.util.formatFileByteSize
|
||||
import com.arm.aiplayground.data.db.dao.ModelDao
|
||||
import com.arm.aiplayground.data.db.entity.ModelEntity
|
||||
import com.arm.aiplayground.data.model.GgufMetadata
|
||||
import com.arm.aiplayground.data.model.ModelInfo
|
||||
import com.arm.aiplayground.data.repo.ModelRepository.ImportProgressTracker
|
||||
import com.arm.aiplayground.data.source.local.LocalFileDataSource
|
||||
import com.arm.aiplayground.data.source.remote.HuggingFaceDownloadInfo
|
||||
import com.arm.aiplayground.data.source.remote.HuggingFaceModel
|
||||
import com.arm.aiplayground.data.source.remote.HuggingFaceModelDetails
|
||||
import com.arm.aiplayground.data.source.remote.HuggingFaceRemoteDataSource
|
||||
import com.arm.aiplayground.monitoring.MemoryMetrics
|
||||
import com.arm.aiplayground.monitoring.StorageMetrics
|
||||
import com.arm.aiplayground.util.formatFileByteSize
|
||||
import dagger.hilt.android.qualifiers.ApplicationContext
|
||||
import kotlinx.coroutines.CancellationException
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package com.example.llama.data.repo
|
||||
package com.arm.aiplayground.data.repo
|
||||
|
||||
import com.example.llama.data.db.dao.SystemPromptDao
|
||||
import com.example.llama.data.db.entity.SystemPromptEntity
|
||||
import com.example.llama.data.model.SystemPrompt
|
||||
import com.arm.aiplayground.data.db.dao.SystemPromptDao
|
||||
import com.arm.aiplayground.data.db.entity.SystemPromptEntity
|
||||
import com.arm.aiplayground.data.model.SystemPrompt
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.first
|
||||
import kotlinx.coroutines.flow.flowOf
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
package com.example.llama.data.source.local
|
||||
package com.arm.aiplayground.data.source.local
|
||||
|
||||
import android.content.Context
|
||||
import android.net.Uri
|
||||
import android.util.Log
|
||||
import com.example.llama.data.source.local.LocalFileDataSource.FileInfo
|
||||
import com.example.llama.util.copyWithBuffer
|
||||
import com.example.llama.util.copyWithChannels
|
||||
import com.example.llama.util.getFileNameFromUri
|
||||
import com.example.llama.util.getFileSizeFromUri
|
||||
import com.arm.aiplayground.data.source.local.LocalFileDataSource.FileInfo
|
||||
import com.arm.aiplayground.util.copyWithBuffer
|
||||
import com.arm.aiplayground.util.copyWithChannels
|
||||
import com.arm.aiplayground.util.getFileNameFromUri
|
||||
import com.arm.aiplayground.util.getFileSizeFromUri
|
||||
import dagger.hilt.android.qualifiers.ApplicationContext
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.data.source.prefs
|
||||
package com.arm.aiplayground.data.source.prefs
|
||||
|
||||
import android.content.Context
|
||||
import androidx.datastore.core.DataStore
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.data.source.prefs
|
||||
package com.arm.aiplayground.data.source.prefs
|
||||
|
||||
import android.content.Context
|
||||
import androidx.datastore.core.DataStore
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.data.source.remote
|
||||
package com.arm.aiplayground.data.source.remote
|
||||
|
||||
import com.google.gson.JsonDeserializationContext
|
||||
import com.google.gson.JsonDeserializer
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.data.source.remote
|
||||
package com.arm.aiplayground.data.source.remote
|
||||
|
||||
import okhttp3.ResponseBody
|
||||
import retrofit2.Response
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package com.example.llama.data.source.remote
|
||||
package com.arm.aiplayground.data.source.remote
|
||||
|
||||
import android.net.Uri
|
||||
import androidx.core.net.toUri
|
||||
import com.example.llama.di.HUGGINGFACE_HOST
|
||||
import com.arm.aiplayground.di.HUGGINGFACE_HOST
|
||||
import java.util.Date
|
||||
|
||||
internal const val FILE_EXTENSION_GGUF = ".GGUF"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.data.source.remote
|
||||
package com.arm.aiplayground.data.source.remote
|
||||
|
||||
import java.util.Date
|
||||
import kotlin.String
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package com.example.llama.data.source.remote
|
||||
package com.arm.aiplayground.data.source.remote
|
||||
|
||||
import android.content.Context
|
||||
import com.example.llama.monitoring.MemoryMetrics
|
||||
import com.arm.aiplayground.monitoring.MemoryMetrics
|
||||
|
||||
|
||||
/*
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package com.example.llama.data.source.remote
|
||||
package com.arm.aiplayground.data.source.remote
|
||||
|
||||
import android.app.DownloadManager
|
||||
import android.content.Context
|
||||
import android.os.Environment
|
||||
import android.util.Log
|
||||
import com.example.llama.monitoring.MemoryMetrics
|
||||
import com.arm.aiplayground.monitoring.MemoryMetrics
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.async
|
||||
import kotlinx.coroutines.awaitAll
|
||||
|
|
@ -1,29 +1,29 @@
|
|||
package com.example.llama.di
|
||||
package com.arm.aiplayground.di
|
||||
|
||||
import android.content.Context
|
||||
import com.arm.aichat.AiChat
|
||||
import com.arm.aichat.InferenceEngine
|
||||
import com.arm.aichat.TierDetection
|
||||
import com.arm.aichat.gguf.GgufMetadataReader
|
||||
import com.example.llama.data.db.AppDatabase
|
||||
import com.example.llama.data.repo.ModelRepository
|
||||
import com.example.llama.data.repo.ModelRepositoryImpl
|
||||
import com.example.llama.data.repo.SystemPromptRepository
|
||||
import com.example.llama.data.repo.SystemPromptRepositoryImpl
|
||||
import com.example.llama.data.source.local.LocalFileDataSource
|
||||
import com.example.llama.data.source.local.LocalFileDataSourceImpl
|
||||
import com.example.llama.data.source.remote.GatedTypeAdapter
|
||||
import com.example.llama.data.source.remote.HuggingFaceApiService
|
||||
import com.example.llama.data.source.remote.HuggingFaceRemoteDataSource
|
||||
import com.example.llama.data.source.remote.HuggingFaceRemoteDataSourceImpl
|
||||
import com.example.llama.engine.BenchmarkService
|
||||
import com.example.llama.engine.ConversationService
|
||||
import com.example.llama.engine.InferenceService
|
||||
import com.example.llama.engine.InferenceServiceImpl
|
||||
import com.example.llama.engine.ModelLoadingService
|
||||
import com.example.llama.engine.StubInferenceEngine
|
||||
import com.example.llama.engine.StubTierDetection
|
||||
import com.example.llama.monitoring.PerformanceMonitor
|
||||
import com.arm.aiplayground.data.db.AppDatabase
|
||||
import com.arm.aiplayground.data.repo.ModelRepository
|
||||
import com.arm.aiplayground.data.repo.ModelRepositoryImpl
|
||||
import com.arm.aiplayground.data.repo.SystemPromptRepository
|
||||
import com.arm.aiplayground.data.repo.SystemPromptRepositoryImpl
|
||||
import com.arm.aiplayground.data.source.local.LocalFileDataSource
|
||||
import com.arm.aiplayground.data.source.local.LocalFileDataSourceImpl
|
||||
import com.arm.aiplayground.data.source.remote.GatedTypeAdapter
|
||||
import com.arm.aiplayground.data.source.remote.HuggingFaceApiService
|
||||
import com.arm.aiplayground.data.source.remote.HuggingFaceRemoteDataSource
|
||||
import com.arm.aiplayground.data.source.remote.HuggingFaceRemoteDataSourceImpl
|
||||
import com.arm.aiplayground.engine.BenchmarkService
|
||||
import com.arm.aiplayground.engine.ConversationService
|
||||
import com.arm.aiplayground.engine.InferenceService
|
||||
import com.arm.aiplayground.engine.InferenceServiceImpl
|
||||
import com.arm.aiplayground.engine.ModelLoadingService
|
||||
import com.arm.aiplayground.engine.StubInferenceEngine
|
||||
import com.arm.aiplayground.engine.StubTierDetection
|
||||
import com.arm.aiplayground.monitoring.PerformanceMonitor
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.GsonBuilder
|
||||
import dagger.Binds
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package com.example.llama.engine
|
||||
package com.arm.aiplayground.engine
|
||||
|
||||
import android.util.Log
|
||||
import com.arm.aichat.InferenceEngine
|
||||
import com.arm.aichat.InferenceEngine.State
|
||||
import com.example.llama.data.model.ModelInfo
|
||||
import com.arm.aiplayground.data.model.ModelInfo
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package com.example.llama.engine
|
||||
package com.arm.aiplayground.engine
|
||||
|
||||
import android.util.Log
|
||||
import com.arm.aichat.InferenceEngine
|
||||
import com.arm.aichat.InferenceEngine.State
|
||||
import com.example.llama.APP_NAME
|
||||
import com.arm.aiplayground.APP_NAME
|
||||
import kotlinx.coroutines.CancellationException
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.engine
|
||||
package com.arm.aiplayground.engine
|
||||
|
||||
import com.arm.aichat.LLamaTier
|
||||
import com.arm.aichat.TierDetection
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.monitoring
|
||||
package com.arm.aiplayground.monitoring
|
||||
|
||||
import android.app.ActivityManager
|
||||
import android.content.Context
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.monitoring
|
||||
package com.arm.aiplayground.monitoring
|
||||
|
||||
/**
|
||||
* Data class containing battery information.
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package com.example.llama.navigation
|
||||
package com.arm.aiplayground.navigation
|
||||
|
||||
import androidx.navigation.NavController
|
||||
import com.example.llama.engine.ModelLoadingMetrics
|
||||
import com.arm.aiplayground.engine.ModelLoadingMetrics
|
||||
|
||||
/**
|
||||
* Navigation destinations for the app
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.components
|
||||
package com.arm.aiplayground.ui.components
|
||||
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.text.TextAutoSize
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.components
|
||||
package com.arm.aiplayground.ui.components
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.components
|
||||
package com.arm.aiplayground.ui.components
|
||||
|
||||
import androidx.compose.animation.AnimatedVisibility
|
||||
import androidx.compose.animation.expandVertically
|
||||
|
|
@ -40,8 +40,8 @@ import androidx.compose.ui.text.font.FontStyle
|
|||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.example.llama.data.model.ModelInfo
|
||||
import com.example.llama.util.languageCodeToFlagEmoji
|
||||
import com.arm.aiplayground.data.model.ModelInfo
|
||||
import com.arm.aiplayground.util.languageCodeToFlagEmoji
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
import java.util.Locale
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.components
|
||||
package com.arm.aiplayground.ui.components
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
|
|
@ -17,7 +17,7 @@ import androidx.compose.runtime.Composable
|
|||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.example.llama.viewmodel.UnloadModelState
|
||||
import com.arm.aiplayground.viewmodel.UnloadModelState
|
||||
|
||||
/**
|
||||
* Reusable component for handling model unloading dialogs
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.scaffold
|
||||
package com.arm.aiplayground.ui.scaffold
|
||||
|
||||
import androidx.compose.animation.AnimatedContentTransitionScope
|
||||
import androidx.compose.animation.core.LinearOutSlowInEasing
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.scaffold
|
||||
package com.arm.aiplayground.ui.scaffold
|
||||
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
|
|
@ -8,19 +8,19 @@ import androidx.compose.material3.SnackbarHost
|
|||
import androidx.compose.material3.SnackbarHostState
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.remember
|
||||
import com.example.llama.ui.scaffold.bottombar.BenchmarkBottomBar
|
||||
import com.example.llama.ui.scaffold.bottombar.BottomBarConfig
|
||||
import com.example.llama.ui.scaffold.bottombar.ConversationBottomBar
|
||||
import com.example.llama.ui.scaffold.bottombar.ModelsBrowsingBottomBar
|
||||
import com.example.llama.ui.scaffold.bottombar.ModelsDeletingBottomBar
|
||||
import com.example.llama.ui.scaffold.bottombar.ModelsManagementBottomBar
|
||||
import com.example.llama.ui.scaffold.bottombar.ModelsSearchingBottomBar
|
||||
import com.example.llama.ui.scaffold.topbar.DefaultTopBar
|
||||
import com.example.llama.ui.scaffold.topbar.ModelsBrowsingTopBar
|
||||
import com.example.llama.ui.scaffold.topbar.NavigationIcon
|
||||
import com.example.llama.ui.scaffold.topbar.PerformanceTopBar
|
||||
import com.example.llama.ui.scaffold.topbar.ModelsManagementTopBar
|
||||
import com.example.llama.ui.scaffold.topbar.TopBarConfig
|
||||
import com.arm.aiplayground.ui.scaffold.bottombar.BenchmarkBottomBar
|
||||
import com.arm.aiplayground.ui.scaffold.bottombar.BottomBarConfig
|
||||
import com.arm.aiplayground.ui.scaffold.bottombar.ConversationBottomBar
|
||||
import com.arm.aiplayground.ui.scaffold.bottombar.ModelsBrowsingBottomBar
|
||||
import com.arm.aiplayground.ui.scaffold.bottombar.ModelsDeletingBottomBar
|
||||
import com.arm.aiplayground.ui.scaffold.bottombar.ModelsManagementBottomBar
|
||||
import com.arm.aiplayground.ui.scaffold.bottombar.ModelsSearchingBottomBar
|
||||
import com.arm.aiplayground.ui.scaffold.topbar.DefaultTopBar
|
||||
import com.arm.aiplayground.ui.scaffold.topbar.ModelsBrowsingTopBar
|
||||
import com.arm.aiplayground.ui.scaffold.topbar.NavigationIcon
|
||||
import com.arm.aiplayground.ui.scaffold.topbar.PerformanceTopBar
|
||||
import com.arm.aiplayground.ui.scaffold.topbar.ModelsManagementTopBar
|
||||
import com.arm.aiplayground.ui.scaffold.topbar.TopBarConfig
|
||||
|
||||
/**
|
||||
* Configuration of both [TopBarConfig] and [BottomBarConfig]
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.scaffold
|
||||
package com.arm.aiplayground.ui.scaffold
|
||||
|
||||
import androidx.activity.compose.BackHandler
|
||||
import androidx.compose.foundation.clickable
|
||||
|
|
@ -12,7 +12,6 @@ import androidx.compose.foundation.layout.padding
|
|||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.Folder
|
||||
import androidx.compose.material.icons.filled.Home
|
||||
import androidx.compose.material.icons.filled.Settings
|
||||
import androidx.compose.material3.HorizontalDivider
|
||||
|
|
@ -32,10 +31,10 @@ import androidx.compose.ui.graphics.vector.ImageVector
|
|||
import androidx.compose.ui.platform.LocalConfiguration
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.example.llama.APP_NAME
|
||||
import com.example.llama.BuildConfig
|
||||
import com.example.llama.navigation.AppDestinations
|
||||
import com.example.llama.navigation.NavigationActions
|
||||
import com.arm.aiplayground.APP_NAME
|
||||
import com.arm.aiplayground.BuildConfig
|
||||
import com.arm.aiplayground.navigation.AppDestinations
|
||||
import com.arm.aiplayground.navigation.NavigationActions
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
/**
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.scaffold.bottombar
|
||||
package com.arm.aiplayground.ui.scaffold.bottombar
|
||||
|
||||
import androidx.compose.animation.AnimatedVisibility
|
||||
import androidx.compose.animation.fadeIn
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package com.example.llama.ui.scaffold.bottombar
|
||||
package com.arm.aiplayground.ui.scaffold.bottombar
|
||||
|
||||
import androidx.compose.foundation.text.input.TextFieldState
|
||||
import com.example.llama.data.model.ModelFilter
|
||||
import com.example.llama.data.model.ModelInfo
|
||||
import com.example.llama.data.model.ModelSortOrder
|
||||
import com.example.llama.viewmodel.PreselectedModelToRun
|
||||
import com.arm.aiplayground.data.model.ModelFilter
|
||||
import com.arm.aiplayground.data.model.ModelInfo
|
||||
import com.arm.aiplayground.data.model.ModelSortOrder
|
||||
import com.arm.aiplayground.viewmodel.PreselectedModelToRun
|
||||
|
||||
/**
|
||||
* [BottomAppBar] configurations
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.scaffold.bottombar
|
||||
package com.arm.aiplayground.ui.scaffold.bottombar
|
||||
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.scaffold.bottombar
|
||||
package com.arm.aiplayground.ui.scaffold.bottombar
|
||||
|
||||
import androidx.compose.animation.AnimatedVisibility
|
||||
import androidx.compose.animation.fadeIn
|
||||
|
|
@ -35,7 +35,7 @@ import androidx.compose.runtime.Composable
|
|||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.example.llama.data.model.ModelSortOrder
|
||||
import com.arm.aiplayground.data.model.ModelSortOrder
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.scaffold.bottombar
|
||||
package com.arm.aiplayground.ui.scaffold.bottombar
|
||||
|
||||
import androidx.compose.animation.AnimatedVisibility
|
||||
import androidx.compose.animation.fadeIn
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.scaffold.bottombar
|
||||
package com.arm.aiplayground.ui.scaffold.bottombar
|
||||
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
|
|
@ -34,8 +34,8 @@ import androidx.compose.ui.Modifier
|
|||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.example.llama.R
|
||||
import com.example.llama.data.model.ModelSortOrder
|
||||
import com.arm.aiplayground.R
|
||||
import com.arm.aiplayground.data.model.ModelSortOrder
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.scaffold.bottombar
|
||||
package com.arm.aiplayground.ui.scaffold.bottombar
|
||||
|
||||
import androidx.compose.animation.AnimatedVisibility
|
||||
import androidx.compose.animation.fadeIn
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.scaffold.topbar
|
||||
package com.arm.aiplayground.ui.scaffold.topbar
|
||||
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.scaffold.topbar
|
||||
package com.arm.aiplayground.ui.scaffold.topbar
|
||||
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.Row
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.scaffold.topbar
|
||||
package com.arm.aiplayground.ui.scaffold.topbar
|
||||
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.Row
|
||||
|
|
@ -18,8 +18,8 @@ import androidx.compose.runtime.Composable
|
|||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.example.llama.monitoring.StorageMetrics
|
||||
import com.example.llama.ui.scaffold.ScaffoldEvent
|
||||
import com.arm.aiplayground.monitoring.StorageMetrics
|
||||
import com.arm.aiplayground.ui.scaffold.ScaffoldEvent
|
||||
import java.util.Locale
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.scaffold.topbar
|
||||
package com.arm.aiplayground.ui.scaffold.topbar
|
||||
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.Row
|
||||
|
|
@ -21,10 +21,10 @@ import androidx.compose.runtime.Composable
|
|||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.example.llama.monitoring.MemoryMetrics
|
||||
import com.example.llama.monitoring.TemperatureMetrics
|
||||
import com.example.llama.monitoring.TemperatureWarningLevel
|
||||
import com.example.llama.ui.scaffold.ScaffoldEvent
|
||||
import com.arm.aiplayground.monitoring.MemoryMetrics
|
||||
import com.arm.aiplayground.monitoring.TemperatureMetrics
|
||||
import com.arm.aiplayground.monitoring.TemperatureWarningLevel
|
||||
import com.arm.aiplayground.ui.scaffold.ScaffoldEvent
|
||||
import java.util.Locale
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
package com.example.llama.ui.scaffold.topbar
|
||||
package com.arm.aiplayground.ui.scaffold.topbar
|
||||
|
||||
import com.example.llama.monitoring.MemoryMetrics
|
||||
import com.example.llama.monitoring.StorageMetrics
|
||||
import com.example.llama.monitoring.TemperatureMetrics
|
||||
import com.example.llama.viewmodel.ModelScreenUiMode
|
||||
import com.arm.aiplayground.monitoring.MemoryMetrics
|
||||
import com.arm.aiplayground.monitoring.StorageMetrics
|
||||
import com.arm.aiplayground.monitoring.TemperatureMetrics
|
||||
|
||||
/**
|
||||
* [TopAppBar] configurations
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.screens
|
||||
package com.arm.aiplayground.ui.screens
|
||||
|
||||
import android.content.Intent
|
||||
import android.widget.Toast
|
||||
|
|
@ -50,19 +50,19 @@ import androidx.compose.ui.text.style.TextAlign
|
|||
import androidx.compose.ui.unit.dp
|
||||
import androidx.core.net.toUri
|
||||
import com.arm.aichat.InferenceEngine.State
|
||||
import com.example.llama.data.model.ModelInfo
|
||||
import com.example.llama.engine.ModelLoadingMetrics
|
||||
import com.example.llama.ui.components.ModelCardContentArchitectureRow
|
||||
import com.example.llama.ui.components.ModelCardContentContextRow
|
||||
import com.example.llama.ui.components.ModelCardContentField
|
||||
import com.example.llama.ui.components.ModelCardCoreExpandable
|
||||
import com.example.llama.ui.components.ModelUnloadDialogHandler
|
||||
import com.example.llama.ui.scaffold.ScaffoldEvent
|
||||
import com.example.llama.util.TableData
|
||||
import com.example.llama.util.formatMilliSeconds
|
||||
import com.example.llama.util.parseMarkdownTable
|
||||
import com.example.llama.viewmodel.BenchmarkResult
|
||||
import com.example.llama.viewmodel.BenchmarkViewModel
|
||||
import com.arm.aiplayground.data.model.ModelInfo
|
||||
import com.arm.aiplayground.engine.ModelLoadingMetrics
|
||||
import com.arm.aiplayground.ui.components.ModelCardContentArchitectureRow
|
||||
import com.arm.aiplayground.ui.components.ModelCardContentContextRow
|
||||
import com.arm.aiplayground.ui.components.ModelCardContentField
|
||||
import com.arm.aiplayground.ui.components.ModelCardCoreExpandable
|
||||
import com.arm.aiplayground.ui.components.ModelUnloadDialogHandler
|
||||
import com.arm.aiplayground.ui.scaffold.ScaffoldEvent
|
||||
import com.arm.aiplayground.util.TableData
|
||||
import com.arm.aiplayground.util.formatMilliSeconds
|
||||
import com.arm.aiplayground.util.parseMarkdownTable
|
||||
import com.arm.aiplayground.viewmodel.BenchmarkResult
|
||||
import com.arm.aiplayground.viewmodel.BenchmarkViewModel
|
||||
|
||||
|
||||
@Composable
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.screens
|
||||
package com.arm.aiplayground.ui.screens
|
||||
|
||||
import android.content.Intent
|
||||
import android.widget.Toast
|
||||
|
|
@ -63,19 +63,19 @@ import androidx.lifecycle.Lifecycle
|
|||
import androidx.lifecycle.LifecycleEventObserver
|
||||
import androidx.lifecycle.compose.LocalLifecycleOwner
|
||||
import com.arm.aichat.InferenceEngine.State
|
||||
import com.example.llama.data.model.ModelInfo
|
||||
import com.example.llama.engine.ModelLoadingMetrics
|
||||
import com.example.llama.engine.TokenMetrics
|
||||
import com.example.llama.ui.components.ModelCardContentArchitectureRow
|
||||
import com.example.llama.ui.components.ModelCardContentContextRow
|
||||
import com.example.llama.ui.components.ModelCardContentField
|
||||
import com.example.llama.ui.components.ModelCardCoreExpandable
|
||||
import com.example.llama.ui.components.ModelUnloadDialogHandler
|
||||
import com.example.llama.util.formatMilliSeconds
|
||||
import com.example.llama.util.formatMilliSecondstructured
|
||||
import com.example.llama.util.toEnglishName
|
||||
import com.example.llama.viewmodel.ConversationViewModel
|
||||
import com.example.llama.viewmodel.Message
|
||||
import com.arm.aiplayground.data.model.ModelInfo
|
||||
import com.arm.aiplayground.engine.ModelLoadingMetrics
|
||||
import com.arm.aiplayground.engine.TokenMetrics
|
||||
import com.arm.aiplayground.ui.components.ModelCardContentArchitectureRow
|
||||
import com.arm.aiplayground.ui.components.ModelCardContentContextRow
|
||||
import com.arm.aiplayground.ui.components.ModelCardContentField
|
||||
import com.arm.aiplayground.ui.components.ModelCardCoreExpandable
|
||||
import com.arm.aiplayground.ui.components.ModelUnloadDialogHandler
|
||||
import com.arm.aiplayground.util.formatMilliSeconds
|
||||
import com.arm.aiplayground.util.formatMilliSecondstructured
|
||||
import com.arm.aiplayground.util.toEnglishName
|
||||
import com.arm.aiplayground.viewmodel.ConversationViewModel
|
||||
import com.arm.aiplayground.viewmodel.Message
|
||||
import kotlinx.coroutines.FlowPreview
|
||||
import kotlinx.coroutines.flow.distinctUntilChanged
|
||||
import kotlinx.coroutines.flow.filter
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.screens
|
||||
package com.arm.aiplayground.ui.screens
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
|
|
@ -22,10 +22,10 @@ import androidx.compose.ui.text.font.FontWeight
|
|||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.arm.aichat.gguf.FileType
|
||||
import com.example.llama.data.model.ModelInfo
|
||||
import com.example.llama.ui.components.ModelCardContentArchitectureRow
|
||||
import com.example.llama.ui.components.ModelCardContentContextRow
|
||||
import com.example.llama.ui.components.ModelCardContentTitleRow
|
||||
import com.arm.aiplayground.data.model.ModelInfo
|
||||
import com.arm.aiplayground.ui.components.ModelCardContentArchitectureRow
|
||||
import com.arm.aiplayground.ui.components.ModelCardContentContextRow
|
||||
import com.arm.aiplayground.ui.components.ModelCardContentTitleRow
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
import java.util.Locale
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.screens
|
||||
package com.arm.aiplayground.ui.screens
|
||||
|
||||
import android.content.Intent
|
||||
import android.widget.Toast
|
||||
|
|
@ -60,11 +60,11 @@ import androidx.compose.ui.unit.dp
|
|||
import androidx.core.net.toUri
|
||||
import com.arm.aichat.InferenceEngine.State
|
||||
import com.arm.aichat.UnsupportedArchitectureException
|
||||
import com.example.llama.data.model.SystemPrompt
|
||||
import com.example.llama.engine.ModelLoadingMetrics
|
||||
import com.example.llama.ui.components.ModelCardCoreExpandable
|
||||
import com.example.llama.ui.scaffold.ScaffoldEvent
|
||||
import com.example.llama.viewmodel.ModelLoadingViewModel
|
||||
import com.arm.aiplayground.data.model.SystemPrompt
|
||||
import com.arm.aiplayground.engine.ModelLoadingMetrics
|
||||
import com.arm.aiplayground.ui.components.ModelCardCoreExpandable
|
||||
import com.arm.aiplayground.ui.scaffold.ScaffoldEvent
|
||||
import com.arm.aiplayground.viewmodel.ModelLoadingViewModel
|
||||
|
||||
|
||||
enum class Mode {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.screens
|
||||
package com.arm.aiplayground.ui.screens
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
|
|
@ -13,12 +13,12 @@ import androidx.compose.runtime.Composable
|
|||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.example.llama.data.model.ModelInfo
|
||||
import com.example.llama.ui.components.InfoAction
|
||||
import com.example.llama.ui.components.InfoView
|
||||
import com.example.llama.ui.components.ModelCardFullExpandable
|
||||
import com.example.llama.viewmodel.ModelsViewModel
|
||||
import com.example.llama.viewmodel.PreselectedModelToRun
|
||||
import com.arm.aiplayground.data.model.ModelInfo
|
||||
import com.arm.aiplayground.ui.components.InfoAction
|
||||
import com.arm.aiplayground.ui.components.InfoView
|
||||
import com.arm.aiplayground.ui.components.ModelCardFullExpandable
|
||||
import com.arm.aiplayground.viewmodel.ModelsViewModel
|
||||
import com.arm.aiplayground.viewmodel.PreselectedModelToRun
|
||||
|
||||
@Composable
|
||||
fun ModelsBrowsingScreen(
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.screens
|
||||
package com.arm.aiplayground.ui.screens
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
|
|
@ -60,22 +60,22 @@ import androidx.compose.ui.text.style.TextOverflow
|
|||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.window.DialogProperties
|
||||
import androidx.core.net.toUri
|
||||
import com.example.llama.data.model.ModelInfo
|
||||
import com.example.llama.data.source.remote.HuggingFaceModel
|
||||
import com.example.llama.ui.components.InfoAction
|
||||
import com.example.llama.ui.components.InfoAlertDialog
|
||||
import com.example.llama.ui.components.InfoView
|
||||
import com.example.llama.ui.components.ModelCardFullExpandable
|
||||
import com.example.llama.ui.scaffold.ScaffoldEvent
|
||||
import com.example.llama.util.formatContextLength
|
||||
import com.example.llama.util.formatFileByteSize
|
||||
import com.example.llama.viewmodel.ModelManagementState
|
||||
import com.example.llama.viewmodel.ModelManagementState.Deletion
|
||||
import com.example.llama.viewmodel.ModelManagementState.Download
|
||||
import com.example.llama.viewmodel.ModelManagementState.Importation
|
||||
import com.example.llama.viewmodel.ModelScreenUiMode
|
||||
import com.example.llama.viewmodel.ModelsManagementViewModel
|
||||
import com.example.llama.viewmodel.ModelsViewModel
|
||||
import com.arm.aiplayground.data.model.ModelInfo
|
||||
import com.arm.aiplayground.data.source.remote.HuggingFaceModel
|
||||
import com.arm.aiplayground.ui.components.InfoAction
|
||||
import com.arm.aiplayground.ui.components.InfoAlertDialog
|
||||
import com.arm.aiplayground.ui.components.InfoView
|
||||
import com.arm.aiplayground.ui.components.ModelCardFullExpandable
|
||||
import com.arm.aiplayground.ui.scaffold.ScaffoldEvent
|
||||
import com.arm.aiplayground.util.formatContextLength
|
||||
import com.arm.aiplayground.util.formatFileByteSize
|
||||
import com.arm.aiplayground.viewmodel.ModelManagementState
|
||||
import com.arm.aiplayground.viewmodel.ModelManagementState.Deletion
|
||||
import com.arm.aiplayground.viewmodel.ModelManagementState.Download
|
||||
import com.arm.aiplayground.viewmodel.ModelManagementState.Importation
|
||||
import com.arm.aiplayground.viewmodel.ModelScreenUiMode
|
||||
import com.arm.aiplayground.viewmodel.ModelsManagementViewModel
|
||||
import com.arm.aiplayground.viewmodel.ModelsViewModel
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.screens
|
||||
package com.arm.aiplayground.ui.screens
|
||||
|
||||
import androidx.activity.compose.BackHandler
|
||||
import androidx.compose.foundation.layout.Box
|
||||
|
|
@ -26,14 +26,14 @@ import androidx.compose.ui.Modifier
|
|||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.example.llama.data.model.ModelInfo
|
||||
import com.example.llama.ui.components.InfoView
|
||||
import com.example.llama.ui.scaffold.ScaffoldEvent
|
||||
import com.example.llama.util.formatFileByteSize
|
||||
import com.example.llama.viewmodel.ModelScreenUiMode
|
||||
import com.example.llama.viewmodel.ModelsManagementViewModel
|
||||
import com.example.llama.viewmodel.ModelsViewModel
|
||||
import com.example.llama.viewmodel.PreselectedModelToRun.RamWarning
|
||||
import com.arm.aiplayground.data.model.ModelInfo
|
||||
import com.arm.aiplayground.ui.components.InfoView
|
||||
import com.arm.aiplayground.ui.scaffold.ScaffoldEvent
|
||||
import com.arm.aiplayground.util.formatFileByteSize
|
||||
import com.arm.aiplayground.viewmodel.ModelScreenUiMode
|
||||
import com.arm.aiplayground.viewmodel.ModelsManagementViewModel
|
||||
import com.arm.aiplayground.viewmodel.ModelsViewModel
|
||||
import com.arm.aiplayground.viewmodel.PreselectedModelToRun.RamWarning
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.screens
|
||||
package com.arm.aiplayground.ui.screens
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
|
|
@ -36,10 +36,10 @@ import androidx.compose.ui.focus.focusRequester
|
|||
import androidx.compose.ui.platform.LocalSoftwareKeyboardController
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.example.llama.ui.components.ModelCardFullExpandable
|
||||
import com.example.llama.viewmodel.ModelScreenUiMode
|
||||
import com.example.llama.viewmodel.ModelsViewModel
|
||||
import com.example.llama.viewmodel.PreselectedModelToRun
|
||||
import com.arm.aiplayground.ui.components.ModelCardFullExpandable
|
||||
import com.arm.aiplayground.viewmodel.ModelScreenUiMode
|
||||
import com.arm.aiplayground.viewmodel.ModelsViewModel
|
||||
import com.arm.aiplayground.viewmodel.PreselectedModelToRun
|
||||
|
||||
@ExperimentalMaterial3Api
|
||||
@Composable
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.screens
|
||||
package com.arm.aiplayground.ui.screens
|
||||
|
||||
import android.content.Intent
|
||||
import androidx.compose.foundation.layout.Column
|
||||
|
|
@ -30,12 +30,12 @@ import androidx.compose.ui.unit.dp
|
|||
import androidx.core.net.toUri
|
||||
import com.arm.aichat.ArmFeaturesMapper
|
||||
import com.arm.aichat.ArmFeaturesMapper.DisplayItem
|
||||
import com.example.llama.APP_NAME
|
||||
import com.example.llama.BuildConfig
|
||||
import com.example.llama.data.source.prefs.ColorThemeMode
|
||||
import com.example.llama.data.source.prefs.DarkThemeMode
|
||||
import com.example.llama.ui.components.ArmFeaturesVisualizer
|
||||
import com.example.llama.viewmodel.SettingsViewModel
|
||||
import com.arm.aiplayground.APP_NAME
|
||||
import com.arm.aiplayground.BuildConfig
|
||||
import com.arm.aiplayground.data.source.prefs.ColorThemeMode
|
||||
import com.arm.aiplayground.data.source.prefs.DarkThemeMode
|
||||
import com.arm.aiplayground.ui.components.ArmFeaturesVisualizer
|
||||
import com.arm.aiplayground.viewmodel.SettingsViewModel
|
||||
import kotlin.math.sqrt
|
||||
|
||||
/**
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.theme
|
||||
package com.arm.aiplayground.ui.theme
|
||||
|
||||
import androidx.compose.ui.graphics.Color
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.theme
|
||||
package com.arm.aiplayground.ui.theme
|
||||
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material3.Shapes
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.theme
|
||||
package com.arm.aiplayground.ui.theme
|
||||
|
||||
import android.app.Activity
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
|
|
@ -14,8 +14,8 @@ import androidx.compose.ui.graphics.toArgb
|
|||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.platform.LocalView
|
||||
import androidx.core.view.WindowCompat
|
||||
import com.example.llama.data.source.prefs.ColorThemeMode
|
||||
import com.example.llama.data.source.prefs.DarkThemeMode
|
||||
import com.arm.aiplayground.data.source.prefs.ColorThemeMode
|
||||
import com.arm.aiplayground.data.source.prefs.DarkThemeMode
|
||||
import com.google.accompanist.systemuicontroller.rememberSystemUiController
|
||||
|
||||
// -------------------- ColorScheme --------------------
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.ui.theme
|
||||
package com.arm.aiplayground.ui.theme
|
||||
|
||||
import androidx.compose.material3.Typography
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.util
|
||||
package com.arm.aiplayground.util
|
||||
|
||||
import android.content.Context
|
||||
import android.net.Uri
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.util
|
||||
package com.arm.aiplayground.util
|
||||
|
||||
import java.util.concurrent.TimeUnit
|
||||
import java.util.Locale
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.util
|
||||
package com.arm.aiplayground.util
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.util
|
||||
package com.arm.aiplayground.util
|
||||
|
||||
import java.util.Locale
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.util
|
||||
package com.arm.aiplayground.util
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package com.example.llama.viewmodel
|
||||
package com.arm.aiplayground.viewmodel
|
||||
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.arm.aichat.isUninterruptible
|
||||
import com.example.llama.data.model.ModelInfo
|
||||
import com.example.llama.engine.BenchmarkService
|
||||
import com.example.llama.ui.scaffold.ScaffoldEvent
|
||||
import com.arm.aiplayground.data.model.ModelInfo
|
||||
import com.arm.aiplayground.engine.BenchmarkService
|
||||
import com.arm.aiplayground.ui.scaffold.ScaffoldEvent
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import kotlinx.coroutines.flow.MutableSharedFlow
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
package com.example.llama.viewmodel
|
||||
package com.arm.aiplayground.viewmodel
|
||||
|
||||
import androidx.compose.foundation.text.input.TextFieldState
|
||||
import androidx.compose.foundation.text.input.clearText
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.example.llama.engine.ConversationService
|
||||
import com.example.llama.engine.GenerationUpdate
|
||||
import com.example.llama.engine.TokenMetrics
|
||||
import com.arm.aiplayground.engine.ConversationService
|
||||
import com.arm.aiplayground.engine.GenerationUpdate
|
||||
import com.arm.aiplayground.engine.TokenMetrics
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import kotlinx.coroutines.CancellationException
|
||||
import kotlinx.coroutines.Job
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package com.example.llama.viewmodel
|
||||
package com.arm.aiplayground.viewmodel
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.example.llama.data.source.prefs.AppPreferences
|
||||
import com.example.llama.engine.InferenceService
|
||||
import com.arm.aiplayground.data.source.prefs.AppPreferences
|
||||
import com.arm.aiplayground.engine.InferenceService
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
package com.example.llama.viewmodel
|
||||
package com.arm.aiplayground.viewmodel
|
||||
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.example.llama.data.model.SystemPrompt
|
||||
import com.example.llama.data.repo.ModelRepository
|
||||
import com.example.llama.data.repo.SystemPromptRepository
|
||||
import com.example.llama.engine.ModelLoadingMetrics
|
||||
import com.example.llama.engine.ModelLoadingService
|
||||
import com.arm.aiplayground.data.model.SystemPrompt
|
||||
import com.arm.aiplayground.data.repo.ModelRepository
|
||||
import com.arm.aiplayground.data.repo.SystemPromptRepository
|
||||
import com.arm.aiplayground.engine.ModelLoadingMetrics
|
||||
import com.arm.aiplayground.engine.ModelLoadingService
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import kotlinx.coroutines.flow.SharingStarted
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.viewmodel
|
||||
package com.arm.aiplayground.viewmodel
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
|
|
@ -6,7 +6,7 @@ import com.arm.aichat.InferenceEngine
|
|||
import com.arm.aichat.InferenceEngine.State
|
||||
import com.arm.aichat.isModelLoaded
|
||||
import com.arm.aichat.isUninterruptible
|
||||
import com.example.llama.engine.InferenceService
|
||||
import com.arm.aiplayground.engine.InferenceService
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.asStateFlow
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.viewmodel
|
||||
package com.arm.aiplayground.viewmodel
|
||||
|
||||
import android.app.DownloadManager
|
||||
import android.content.BroadcastReceiver
|
||||
|
|
@ -11,19 +11,19 @@ import android.util.Log
|
|||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.arm.aichat.gguf.InvalidFileFormatException
|
||||
import com.example.llama.data.model.ModelInfo
|
||||
import com.example.llama.data.repo.InsufficientStorageException
|
||||
import com.example.llama.data.repo.ModelRepository
|
||||
import com.example.llama.data.source.remote.HuggingFaceDownloadInfo
|
||||
import com.example.llama.data.source.remote.HuggingFaceModel
|
||||
import com.example.llama.data.source.remote.HuggingFaceModelDetails
|
||||
import com.example.llama.monitoring.MemoryMetrics
|
||||
import com.example.llama.util.formatFileByteSize
|
||||
import com.example.llama.util.getFileNameFromUri
|
||||
import com.example.llama.util.getFileSizeFromUri
|
||||
import com.example.llama.viewmodel.ModelManagementState.Deletion
|
||||
import com.example.llama.viewmodel.ModelManagementState.Download
|
||||
import com.example.llama.viewmodel.ModelManagementState.Importation
|
||||
import com.arm.aiplayground.data.model.ModelInfo
|
||||
import com.arm.aiplayground.data.repo.InsufficientStorageException
|
||||
import com.arm.aiplayground.data.repo.ModelRepository
|
||||
import com.arm.aiplayground.data.source.remote.HuggingFaceDownloadInfo
|
||||
import com.arm.aiplayground.data.source.remote.HuggingFaceModel
|
||||
import com.arm.aiplayground.data.source.remote.HuggingFaceModelDetails
|
||||
import com.arm.aiplayground.monitoring.MemoryMetrics
|
||||
import com.arm.aiplayground.util.formatFileByteSize
|
||||
import com.arm.aiplayground.util.getFileNameFromUri
|
||||
import com.arm.aiplayground.util.getFileSizeFromUri
|
||||
import com.arm.aiplayground.viewmodel.ModelManagementState.Deletion
|
||||
import com.arm.aiplayground.viewmodel.ModelManagementState.Download
|
||||
import com.arm.aiplayground.viewmodel.ModelManagementState.Importation
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import dagger.hilt.android.qualifiers.ApplicationContext
|
||||
import kotlinx.coroutines.Job
|
||||
|
|
@ -1,20 +1,20 @@
|
|||
package com.example.llama.viewmodel
|
||||
package com.arm.aiplayground.viewmodel
|
||||
|
||||
import androidx.compose.foundation.text.input.TextFieldState
|
||||
import androidx.compose.foundation.text.input.clearText
|
||||
import androidx.compose.runtime.snapshotFlow
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.example.llama.data.model.ModelFilter
|
||||
import com.example.llama.data.model.ModelInfo
|
||||
import com.example.llama.data.model.ModelSortOrder
|
||||
import com.example.llama.data.model.filterBy
|
||||
import com.example.llama.data.model.queryBy
|
||||
import com.example.llama.data.model.sortByOrder
|
||||
import com.example.llama.data.repo.ModelRepository
|
||||
import com.example.llama.engine.InferenceService
|
||||
import com.example.llama.monitoring.PerformanceMonitor
|
||||
import com.example.llama.viewmodel.PreselectedModelToRun.RamWarning
|
||||
import com.arm.aiplayground.data.model.ModelFilter
|
||||
import com.arm.aiplayground.data.model.ModelInfo
|
||||
import com.arm.aiplayground.data.model.ModelSortOrder
|
||||
import com.arm.aiplayground.data.model.filterBy
|
||||
import com.arm.aiplayground.data.model.queryBy
|
||||
import com.arm.aiplayground.data.model.sortByOrder
|
||||
import com.arm.aiplayground.data.repo.ModelRepository
|
||||
import com.arm.aiplayground.engine.InferenceService
|
||||
import com.arm.aiplayground.monitoring.PerformanceMonitor
|
||||
import com.arm.aiplayground.viewmodel.PreselectedModelToRun.RamWarning
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import kotlinx.coroutines.FlowPreview
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
package com.example.llama.viewmodel
|
||||
package com.arm.aiplayground.viewmodel
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.arm.aichat.LLamaTier
|
||||
import com.arm.aichat.TierDetection
|
||||
import com.example.llama.data.repo.ModelRepository
|
||||
import com.example.llama.data.source.prefs.ColorThemeMode
|
||||
import com.example.llama.data.source.prefs.DarkThemeMode
|
||||
import com.example.llama.data.source.prefs.UserPreferences
|
||||
import com.example.llama.monitoring.BatteryMetrics
|
||||
import com.example.llama.monitoring.MemoryMetrics
|
||||
import com.example.llama.monitoring.PerformanceMonitor
|
||||
import com.example.llama.monitoring.StorageMetrics
|
||||
import com.example.llama.monitoring.TemperatureMetrics
|
||||
import com.example.llama.monitoring.TemperatureWarningLevel
|
||||
import com.arm.aiplayground.data.repo.ModelRepository
|
||||
import com.arm.aiplayground.data.source.prefs.ColorThemeMode
|
||||
import com.arm.aiplayground.data.source.prefs.DarkThemeMode
|
||||
import com.arm.aiplayground.data.source.prefs.UserPreferences
|
||||
import com.arm.aiplayground.monitoring.BatteryMetrics
|
||||
import com.arm.aiplayground.monitoring.MemoryMetrics
|
||||
import com.arm.aiplayground.monitoring.PerformanceMonitor
|
||||
import com.arm.aiplayground.monitoring.StorageMetrics
|
||||
import com.arm.aiplayground.monitoring.TemperatureMetrics
|
||||
import com.arm.aiplayground.monitoring.TemperatureWarningLevel
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
Loading…
Reference in New Issue