StructuredResponse

data class StructuredResponse<T>(val data: T, val structure: Structure<T, *>, val message: Message.Assistant)(source)

Represents a container for structured data parsed from a response message.

This class is designed to encapsulate both the parsed structured output and the original raw text as returned from a processing step, such as a language model execution.

Parameters

T

The type of the structured data contained within this response.

Constructors

Link copied to clipboard
constructor(data: T, structure: Structure<T, *>, message: Message.Assistant)

Properties

Link copied to clipboard
val data: T

The parsed structured data corresponding to the specific schema.

Link copied to clipboard

The original assistant message from which the structure was parsed.

Link copied to clipboard

The structure used for the response.