KtorSwarmUiGenerationRemoteDataSource

Coordinates KtorSwarmUiGenerationRemoteDataSource behavior in the SDAI data layer.

Author

Dmitriy Moroz

Throws

when the delegated operation cannot complete.

Constructors

Link copied to clipboard
constructor(api: SwarmUiGenerationApi)

Properties

Link copied to clipboard

Exposes the api value used by the SDAI data layer.

Functions

Link copied to clipboard
private fun currentTimeMillis(): Long

Executes the currentTimeMillis step in the SDAI data layer.

Link copied to clipboard
private suspend fun <T : Any> generate(baseUrl: String, credentials: AuthorizationCredentials, payload: T, request: SwarmUiGenerationRequest): Pair<T, String>

Executes the generate step in the SDAI data layer.

Link copied to clipboard
open suspend override fun imageToImage(baseUrl: String, sessionId: String, model: String, credentials: AuthorizationCredentials, payload: ImageToImagePayload): AiGenerationResult

Executes the imageToImage step in the SDAI data layer.

Link copied to clipboard
open suspend override fun textToImage(baseUrl: String, sessionId: String, model: String, credentials: AuthorizationCredentials, payload: TextToImagePayload): AiGenerationResult

Executes the textToImage step in the SDAI data layer.