ServerSetupState

data class ServerSetupState(val showBackNavArrow: Boolean = false, val step: ServerSetupState.Step = Step.SOURCE, val mode: ServerSource = ServerSource.AUTOMATIC1111, val allowedModes: List<ServerSource> = remoteSetupSources, val allowLocalCustomModels: Boolean = true, val modal: ServerSetupState.Modal = Modal.None, val loadingConfiguration: Boolean = true, val serverUrl: String = "", val swarmUiUrl: String = "", val hordeApiKey: String = "", val huggingFaceApiKey: String = "", val openAiApiKey: String = "", val stabilityAiApiKey: String = "", val hordeDefaultApiKey: Boolean = false, val demoMode: Boolean = false, val demoModeUrl: String = "", val authType: ServerSetupState.AuthType = AuthType.ANONYMOUS, val login: String = "", val password: String = "", val huggingFaceModels: List<String> = emptyList(), val huggingFaceModel: String = HuggingFaceModel.default.alias, val localOnnxModels: List<ServerSetupState.LocalModel> = emptyList(), val localOnnxCustomModel: Boolean = false, val localOnnxCustomModelPath: String = "", val localMediaPipeModels: List<ServerSetupState.LocalModel> = emptyList(), val localMediaPipeCustomModel: Boolean = false, val localMediaPipeCustomModelPath: String = "", val passwordVisible: Boolean = false, val serverUrlValidationError: ServerSetupState.ValidationError? = null, val swarmUiUrlValidationError: ServerSetupState.ValidationError? = null, val loginValidationError: ServerSetupState.ValidationError? = null, val passwordValidationError: ServerSetupState.ValidationError? = null, val hordeApiKeyValidationError: ServerSetupState.ValidationError? = null, val huggingFaceApiKeyValidationError: ServerSetupState.ValidationError? = null, val openAiApiKeyValidationError: ServerSetupState.ValidationError? = null, val stabilityAiApiKeyValidationError: ServerSetupState.ValidationError? = null, val localCustomOnnxPathValidationError: ServerSetupState.ValidationError? = null, val localCustomMediaPipePathValidationError: ServerSetupState.ValidationError? = null) : MviState(source)

Carries ServerSetupState data through the SDAI presentation layer.

Author

Dmitriy Moroz

Constructors

Link copied to clipboard
constructor(showBackNavArrow: Boolean = false, step: ServerSetupState.Step = Step.SOURCE, mode: ServerSource = ServerSource.AUTOMATIC1111, allowedModes: List<ServerSource> = remoteSetupSources, allowLocalCustomModels: Boolean = true, modal: ServerSetupState.Modal = Modal.None, loadingConfiguration: Boolean = true, serverUrl: String = "", swarmUiUrl: String = "", hordeApiKey: String = "", huggingFaceApiKey: String = "", openAiApiKey: String = "", stabilityAiApiKey: String = "", hordeDefaultApiKey: Boolean = false, demoMode: Boolean = false, demoModeUrl: String = "", authType: ServerSetupState.AuthType = AuthType.ANONYMOUS, login: String = "", password: String = "", huggingFaceModels: List<String> = emptyList(), huggingFaceModel: String = HuggingFaceModel.default.alias, localOnnxModels: List<ServerSetupState.LocalModel> = emptyList(), localOnnxCustomModel: Boolean = false, localOnnxCustomModelPath: String = "", localMediaPipeModels: List<ServerSetupState.LocalModel> = emptyList(), localMediaPipeCustomModel: Boolean = false, localMediaPipeCustomModelPath: String = "", passwordVisible: Boolean = false, serverUrlValidationError: ServerSetupState.ValidationError? = null, swarmUiUrlValidationError: ServerSetupState.ValidationError? = null, loginValidationError: ServerSetupState.ValidationError? = null, passwordValidationError: ServerSetupState.ValidationError? = null, hordeApiKeyValidationError: ServerSetupState.ValidationError? = null, huggingFaceApiKeyValidationError: ServerSetupState.ValidationError? = null, openAiApiKeyValidationError: ServerSetupState.ValidationError? = null, stabilityAiApiKeyValidationError: ServerSetupState.ValidationError? = null, localCustomOnnxPathValidationError: ServerSetupState.ValidationError? = null, localCustomMediaPipePathValidationError: ServerSetupState.ValidationError? = null)

Types

Link copied to clipboard
Link copied to clipboard
object Companion
Link copied to clipboard
data class LocalModel(val id: String, val name: String, val size: String, val sources: List<String> = emptyList(), val downloaded: Boolean = false, val downloadState: DownloadState = DownloadState.Unknown, val selected: Boolean = false)
Link copied to clipboard
sealed interface Modal
Link copied to clipboard

Properties

Link copied to clipboard

Exposes the allowedModes value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the allowLocalCustomModels value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the authType value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the demoMode value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the demoModeUrl value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the hordeApiKey value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the hordeApiKeyValidationError value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the hordeDefaultApiKey value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the huggingFaceApiKey value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the huggingFaceApiKeyValidationError value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the huggingFaceModel value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the huggingFaceModels value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the loadingConfiguration value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the localCustomMediaPipePathValidationError value used by the SDAI presentation layer.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Exposes the localCustomOnnxPathValidationError value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the localMediaPipeCustomModel value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the localMediaPipeCustomModelPath value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the localMediaPipeModels value used by the SDAI presentation layer.

Link copied to clipboard
Link copied to clipboard

Exposes the localOnnxCustomModel value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the localOnnxCustomModelPath value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the localOnnxModels value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the login value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the loginValidationError value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the ServerSetupState value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the modal value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the mode value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the openAiApiKey value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the openAiApiKeyValidationError value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the password value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the passwordValidationError value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the passwordVisible value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the serverUrl value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the serverUrlValidationError value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the showBackNavArrow value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the stabilityAiApiKey value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the stabilityAiApiKeyValidationError value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the step value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the swarmUiUrl value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the swarmUiUrlValidationError value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the ServerSetupState value used by the SDAI presentation layer.

Functions

Link copied to clipboard

Executes the validateApiKey step in the SDAI presentation layer.

Link copied to clipboard
private fun ServerSetupState.validateLocalModel(customModel: Boolean, customModelPath: String, hasDownloadedSelection: Boolean, filePathValidator: FilePathValidator, update: ServerSetupState.(ServerSetupState.ValidationError?) -> ServerSetupState): ServerSetupValidationResult

Executes the validateLocalModel step in the SDAI presentation layer.

Link copied to clipboard

Executes the validateServerSetup step in the SDAI presentation layer.

Link copied to clipboard

Executes the validateServerUrlAndCredentials step in the SDAI presentation layer.

Link copied to clipboard