KtorHordeGenerationApi

class KtorHordeGenerationApi(val httpClient: HttpClient, val baseUrl: String) : HordeGenerationApi(source)

Coordinates KtorHordeGenerationApi behavior in the SDAI network layer.

Author

Dmitriy Moroz

Constructors

Link copied to clipboard
constructor(httpClient: HttpClient, baseUrl: String)
constructor(baseUrl: String)

Creates a new SDAI component instance.

Types

Link copied to clipboard
private object Companion

Provides the companion object singleton used by the SDAI network layer.

Properties

Link copied to clipboard
private val baseUrl: String

Exposes the baseUrl value used by the SDAI network layer.

Link copied to clipboard
private val httpClient: HttpClient

Exposes the httpClient value used by the SDAI network layer.

Functions

Link copied to clipboard
open suspend override fun cancelRequest(apiKey: String, requestId: String)

Executes the cancelRequest step in the SDAI network layer.

Link copied to clipboard
open suspend override fun checkGeneration(apiKey: String, id: String): HordeGenerationCheckResponse

Executes the checkGeneration step in the SDAI network layer.

Link copied to clipboard
open suspend override fun checkHordeApiKey(apiKey: String): HordeUserResponse

Executes the checkHordeApiKey step in the SDAI network layer.

Link copied to clipboard
open suspend override fun checkStatus(apiKey: String, id: String): HordeGenerationCheckFullResponse

Executes the checkStatus step in the SDAI network layer.

Link copied to clipboard
open suspend override fun downloadImage(url: String): ByteArray

Executes the downloadImage step in the SDAI network layer.

Link copied to clipboard

Executes the generateAsync step in the SDAI network layer.

Link copied to clipboard
private fun HttpRequestBuilder.hordeApiKey(apiKey: String)

Executes the function step in the SDAI network layer.