ConversationItem

data class ConversationItem(val value: JsonObject)

A conversation item. The complete JSON object is preserved so hosted-tool and future item variants can be read and sent back without losing fields. Factories cover common input items.

Constructors

Link copied to clipboard
constructor(value: JsonObject)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
object Serializer : KSerializer<ConversationItem>

Serializes the item as its JSON object rather than as a wrapper property.

Properties

Link copied to clipboard

Function call identifier shared by a call and its output.

Link copied to clipboard
val content: JsonElement?

Message content in its original text or content-part form.

Link copied to clipboard
val id: String?

Server-assigned item identifier, absent for new input messages.

Link copied to clipboard
val output: JsonElement?

Function output in its original text or content-part form.

Link copied to clipboard
val role: Role?

Message role, if this is a message item.

Link copied to clipboard
val type: String?

Item discriminator, such as message, function_call or function_call_output.

Link copied to clipboard
val value: JsonObject