All Downloads are FREE. Search and download functionalities are using the official Maven repository.

maestro.ai.openai.Request.kt Maven / Gradle / Ivy

Go to download

Maestro is a server-driven platform-agnostic library that allows to drive tests for both iOS and Android using the same implementation through an intuitive API.

The newest version!
package maestro.ai.openai

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import kotlinx.serialization.json.JsonObject
import maestro.ai.common.Base64Image

@Serializable
data class ChatCompletionRequest(
    val model: String,
    val messages: List,
    val temperature: Float,
    @SerialName("max_tokens") val maxTokens: Int,
    @SerialName("response_format") val responseFormat: ResponseFormat?,
    val seed: Int,
)

@Serializable
class ResponseFormat(
    val type: String,
    @SerialName("json_schema") val jsonSchema: JsonObject,
)

@Serializable
data class MessageContent(
    val role: String,
    val content: List,
)

@Serializable
data class ContentDetail(
    val type: String,
    val text: String? = null,
    @SerialName("image_url") val imageUrl: Base64Image? = null,
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy