KtorFalAiGenerationRemoteDataSource

class KtorFalAiGenerationRemoteDataSource(val api: FalAiGenerationApi, val pollIntervalMillis: Long = DEFAULT_POLL_INTERVAL_MILLIS, val maxPollAttempts: Int = DEFAULT_MAX_POLL_ATTEMPTS) : FalAiGenerationDataSource.Remote(source)

Coordinates KtorFalAiGenerationRemoteDataSource behavior in the SDAI data layer.

Author

Dmitriy Moroz

Constructors

Link copied to clipboard
constructor(api: FalAiGenerationApi, pollIntervalMillis: Long = DEFAULT_POLL_INTERVAL_MILLIS, maxPollAttempts: Int = DEFAULT_MAX_POLL_ATTEMPTS)

Types

Link copied to clipboard
private object Companion

Properties

Link copied to clipboard
private val api: FalAiGenerationApi

Exposes the api value used by the SDAI data layer.

Link copied to clipboard
private val maxPollAttempts: Int

Exposes the maxPollAttempts value used by the SDAI data layer.

Link copied to clipboard

Exposes the pollIntervalMillis value used by the SDAI data layer.

Functions

Link copied to clipboard
Link copied to clipboard
open suspend override fun imageToImage(apiKey: String, payload: ImageToImagePayload): List<AiGenerationResult>

Executes the imageToImage step in the SDAI data layer.

Link copied to clipboard
open suspend override fun textToImage(apiKey: String, payload: TextToImagePayload): List<AiGenerationResult>

Executes the textToImage step in the SDAI data layer.

Link copied to clipboard
private suspend fun FalAiImage.toBase64(): String?
Link copied to clipboard
open suspend override fun validateApiKey(apiKey: String): Boolean

Executes the validateApiKey step in the SDAI data layer.