commonMain.com.xebia.functional.openai.generated.model.MessageObject.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xef-openai-client Show documentation
Show all versions of xef-openai-client Show documentation
Building applications with LLMs through composability in Kotlin
The newest version!
/**
*
* Please note:
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* Do not edit this file manually.
*
*/
@file:Suppress(
"ArrayInDataClass",
"EnumEntryName",
"RemoveRedundantQualifierName",
"UnusedImport"
)
package com.xebia.functional.openai.generated.model
import com.xebia.functional.openai.generated.model.MessageObjectAttachmentsInner
import com.xebia.functional.openai.generated.model.MessageObjectContentInner
import com.xebia.functional.openai.generated.model.MessageObjectIncompleteDetails
import kotlinx.serialization.Serializable
import kotlinx.serialization.SerialName
import kotlinx.serialization.Contextual
import kotlin.js.JsName
import kotlinx.serialization.json.*
/**
* Represents a message within a [thread](/docs/api-reference/threads).
*
* @param id The identifier, which can be referenced in API endpoints.
* @param `object` The object type, which is always `thread.message`.
* @param createdAt The Unix timestamp (in seconds) for when the message was created.
* @param threadId The [thread](/docs/api-reference/threads) ID that this message belongs to.
* @param status The status of the message, which can be either `in_progress`, `incomplete`, or `completed`.
* @param incompleteDetails
* @param completedAt The Unix timestamp (in seconds) for when the message was completed.
* @param incompleteAt The Unix timestamp (in seconds) for when the message was marked as incomplete.
* @param role The entity that produced the message. One of `user` or `assistant`.
* @param content The content of the message in array of text and/or images.
* @param assistantId If applicable, the ID of the [assistant](/docs/api-reference/assistants) that authored this message.
* @param runId The ID of the [run](/docs/api-reference/runs) associated with the creation of this message. Value is `null` when messages are created manually using the create message or create thread endpoints.
* @param attachments A list of files attached to the message, and the tools they were added to.
* @param metadata Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
*/
@Serializable
data class MessageObject (
/* The identifier, which can be referenced in API endpoints. */
@SerialName(value = "id") val id: kotlin.String,
/* The object type, which is always `thread.message`. */
@SerialName(value = "object") val `object`: MessageObject.`Object`,
/* The Unix timestamp (in seconds) for when the message was created. */
@SerialName(value = "created_at") val createdAt: kotlin.Int,
/* The [thread](/docs/api-reference/threads) ID that this message belongs to. */
@SerialName(value = "thread_id") val threadId: kotlin.String,
/* The status of the message, which can be either `in_progress`, `incomplete`, or `completed`. */
@SerialName(value = "status") val status: MessageObject.Status? = null,
@SerialName(value = "incomplete_details") val incompleteDetails: MessageObjectIncompleteDetails?,
/* The Unix timestamp (in seconds) for when the message was completed. */
@SerialName(value = "completed_at") val completedAt: kotlin.Int?,
/* The Unix timestamp (in seconds) for when the message was marked as incomplete. */
@SerialName(value = "incomplete_at") val incompleteAt: kotlin.Int?,
/* The entity that produced the message. One of `user` or `assistant`. */
@SerialName(value = "role") val role: MessageObject.Role,
/* The content of the message in array of text and/or images. */
@SerialName(value = "content") val content: kotlin.collections.List,
/* If applicable, the ID of the [assistant](/docs/api-reference/assistants) that authored this message. */
@SerialName(value = "assistant_id") val assistantId: kotlin.String?,
/* The ID of the [run](/docs/api-reference/runs) associated with the creation of this message. Value is `null` when messages are created manually using the create message or create thread endpoints. */
@SerialName(value = "run_id") val runId: kotlin.String?,
/* A list of files attached to the message, and the tools they were added to. */
@SerialName(value = "attachments") val attachments: kotlin.collections.List?,
/* Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long. */
@SerialName(value = "metadata") val metadata: kotlinx.serialization.json.JsonObject? = null
) {
/**
* The object type, which is always `thread.message`.
*
* Values: thread_message
*/
@Serializable
enum class `Object`(val value: kotlin.String) {
@SerialName(value = "thread.message") thread_message("thread.message");
}
/**
* The status of the message, which can be either `in_progress`, `incomplete`, or `completed`.
*
* Values: in_progress,incomplete,completed
*/
@Serializable
enum class Status(val value: kotlin.String) {
@SerialName(value = "in_progress") in_progress("in_progress"),
@SerialName(value = "incomplete") incomplete("incomplete"),
@SerialName(value = "completed") completed("completed");
}
/**
* The entity that produced the message. One of `user` or `assistant`.
*
* Values: user,assistant
*/
@Serializable
enum class Role(val value: kotlin.String) {
@SerialName(value = "user") user("user"),
@SerialName(value = "assistant") assistant("assistant");
}
}