MessageContentSerializer

Custom serializer for MessageContent that handles both string and array formats.

According to the OpenAI specification, message content can be:

  • A simple string (serialized as JSON string)

  • An array of content parts (serialized as JSON array)

This serializer automatically converts between these formats.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override val descriptor: SerialDescriptor

Functions

Link copied to clipboard
open override fun deserialize(decoder: Decoder): MessageContent
Link copied to clipboard
open override fun serialize(encoder: Encoder, value: MessageContent)