OpenAIToolChoiceSerializer

Serializer for OpenAIToolChoice handling the mode string ("auto", "none", "required") and the named-tool object forms: the Chat Completions form ({"type": "function", "function": {"name": "..."}}) and the Responses API form ({"type": "function", "name": "..."}).

Serialization always produces the Chat Completions (nested) object form.

Properties

Link copied to clipboard
open override val descriptor: SerialDescriptor

Functions

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