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

maestro.ai.openai.Response.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

@Serializable
data class ChatCompletionResponse(
    val id: String,
    val `object`: String,
    val created: Long,
    val model: String,
    @SerialName("system_fingerprint") val systemFingerprint: String? = null,
    val usage: Usage? = null,
    val choices: List,
)

@Serializable
data class Usage(
    @SerialName("prompt_tokens") val promptTokens: Int,
    @SerialName("completion_tokens") val completionTokens: Int? = null,
    @SerialName("total_tokens") val totalTokens: Int,
)

@Serializable
data class Choice(
    val message: Message,
    @SerialName("finish_details") val finishDetails: FinishDetails? = null,
    val index: Int,
    @SerialName("finish_reason") val finishReason: String? = null,
)

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

@Serializable
data class FinishDetails(
    val type: String,
    val stop: String? = null,
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy