Class StructuredMessageCreateParams
-
- All Implemented Interfaces:
public final class StructuredMessageCreateParams<T extends Object>A wrapper for MessageCreateParams that provides a type-safe Builder that can record the outputType used to derive a JSON schema from an arbitrary class when using the Structured Outputs feature. When a JSON response is received, it is deserialized to an instance of that type. See the SDK documentation for more details on Structured Outputs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classStructuredMessageCreateParams.BuilderA builder for StructuredMessageCreateParams.
-
Field Summary
Fields Modifier and Type Field Description private final Class<T>outputTypeprivate final MessageCreateParamsrawParams
-
Method Summary
-
-
Method Detail
-
outputType
final Class<T> outputType()
-
rawParams
final MessageCreateParams rawParams()
The raw, underlying message create parameters wrapped by this structured instance of the parameters.
-
userProfileId
final Optional<String> userProfileId()
-
workspaceId
final Optional<String> workspaceId()
-
messages
final List<MessageParam> messages()
-
cacheControl
final Optional<CacheControlEphemeral> cacheControl()
-
container
final Optional<MessageCreateParamsContainer> container()
-
diagnostics
final Optional<DiagnosticsParam> diagnostics()
-
inferenceGeo
final Optional<String> inferenceGeo()
-
outputConfig
final Optional<OutputConfig> outputConfig()
-
serviceTier
final Optional<MessageCreateParams.ServiceTier> serviceTier()
-
speed
final Optional<MessageCreateParams.Speed> speed()
-
stopSequences
final Optional<List<String>> stopSequences()
-
system
final Optional<MessageCreateParams.System> system()
-
thinking
final Optional<ThinkingConfigParam> thinking()
-
toolChoice
final Optional<ToolChoice> toolChoice()
-
_maxTokens
final JsonField<Long> _maxTokens()
Returns the raw JSON value of maxTokens.
Unlike maxTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_messages
final JsonField<List<MessageParam>> _messages()
Returns the raw JSON value of messages.
Unlike messages, this method doesn't throw if the JSON field has an unexpected type.
-
_model
final JsonField<Model> _model()
Returns the raw JSON value of model.
Unlike model, this method doesn't throw if the JSON field has an unexpected type.
-
_cacheControl
final JsonField<CacheControlEphemeral> _cacheControl()
Returns the raw JSON value of cacheControl.
Unlike cacheControl, this method doesn't throw if the JSON field has an unexpected type.
-
_container
final JsonField<MessageCreateParamsContainer> _container()
Returns the raw JSON value of container.
Unlike container, this method doesn't throw if the JSON field has an unexpected type.
-
_diagnostics
final JsonField<DiagnosticsParam> _diagnostics()
Returns the raw JSON value of diagnostics.
Unlike diagnostics, this method doesn't throw if the JSON field has an unexpected type.
-
_inferenceGeo
final JsonField<String> _inferenceGeo()
Returns the raw JSON value of inferenceGeo.
Unlike inferenceGeo, this method doesn't throw if the JSON field has an unexpected type.
-
_metadata
final JsonField<Metadata> _metadata()
Returns the raw JSON value of metadata.
Unlike metadata, this method doesn't throw if the JSON field has an unexpected type.
-
_outputConfig
final JsonField<OutputConfig> _outputConfig()
Returns the raw JSON value of outputConfig.
Unlike outputConfig, this method doesn't throw if the JSON field has an unexpected type.
-
_serviceTier
final JsonField<MessageCreateParams.ServiceTier> _serviceTier()
Returns the raw JSON value of serviceTier.
Unlike serviceTier, this method doesn't throw if the JSON field has an unexpected type.
-
_speed
final JsonField<MessageCreateParams.Speed> _speed()
Returns the raw JSON value of speed.
Unlike speed, this method doesn't throw if the JSON field has an unexpected type.
-
_stopSequences
final JsonField<List<String>> _stopSequences()
Returns the raw JSON value of stopSequences.
Unlike stopSequences, this method doesn't throw if the JSON field has an unexpected type.
-
_system
final JsonField<MessageCreateParams.System> _system()
Returns the raw JSON value of system.
Unlike system, this method doesn't throw if the JSON field has an unexpected type.
-
_thinking
final JsonField<ThinkingConfigParam> _thinking()
Returns the raw JSON value of thinking.
Unlike thinking, this method doesn't throw if the JSON field has an unexpected type.
-
_toolChoice
final JsonField<ToolChoice> _toolChoice()
Returns the raw JSON value of toolChoice.
Unlike toolChoice, this method doesn't throw if the JSON field has an unexpected type.
-
_tools
final JsonField<List<ToolUnion>> _tools()
Returns the raw JSON value of tools.
Unlike tools, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalBodyProperties
final Map<String, JsonValue> _additionalBodyProperties()
-
_additionalHeaders
final Headers _additionalHeaders()
-
_additionalQueryParams
final QueryParams _additionalQueryParams()
-
toBuilder
final StructuredMessageCreateParams.Builder<T> toBuilder()
-
builder
final static <T extends Any> StructuredMessageCreateParams.Builder<T> builder()
Returns a mutable builder for constructing an instance of StructuredMessageCreateParams.
The following fields are required:
.maxTokens() .messages() .model()
-
-
-
-