Class StructuredMessage
-
- All Implemented Interfaces:
public final class StructuredMessage<T extends Object>A wrapper for BetaMessage that provides type-safe access to the content when using the Structured Outputs feature to deserialize a JSON response to an instance of an arbitrary class. See the SDK documentation for more details on Structured Outputs.
-
-
Field Summary
Fields Modifier and Type Field Description private final Class<T>outputTypeprivate final BetaMessagerawMessage
-
Method Summary
-
-
Method Detail
-
outputType
final Class<T> outputType()
-
rawMessage
final BetaMessage rawMessage()
-
container
final Optional<BetaContainer> container()
-
content
final List<StructuredContentBlock<T>> content()
-
contextManagement
final Optional<BetaContextManagementResponse> contextManagement()
-
diagnostics
final Optional<BetaDiagnostics> diagnostics()
-
stopDetails
final Optional<BetaRefusalStopDetails> stopDetails()
-
stopReason
final Optional<BetaStopReason> stopReason()
-
stopSequence
final Optional<String> stopSequence()
-
_container
final JsonField<BetaContainer> _container()
-
_content
final JsonField<List<StructuredContentBlock<T>>> _content()
-
_contextManagement
final JsonField<BetaContextManagementResponse> _contextManagement()
-
_diagnostics
final JsonField<BetaDiagnostics> _diagnostics()
-
_stopDetails
final JsonField<BetaRefusalStopDetails> _stopDetails()
-
_stopReason
final JsonField<BetaStopReason> _stopReason()
-
_stopSequence
final JsonField<String> _stopSequence()
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
validate
final StructuredMessage<T> validate()
-
-
-
-