KtorOpenAiGenerationApi

class KtorOpenAiGenerationApi(val httpClient: HttpClient, val baseUrl: String) : OpenAiGenerationApi(source)

Coordinates KtorOpenAiGenerationApi 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 generateImage(apiKey: String, request: OpenAiRequest): OpenAiResponse

Executes the generateImage step in the SDAI network layer.

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

Executes the validateBearerToken step in the SDAI network layer.