Class ChatCreateCompletionParams
-
- All Implemented Interfaces:
-
dev.case.api.core.Params
public final class ChatCreateCompletionParams implements Params
Create a completion for the provided prompt and parameters. Compatible with OpenAI's chat completions API. Supports 40+ models including GPT-4, Claude, Gemini, and CaseMark legal AI models. Includes streaming support, token counting, and usage tracking.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classChatCreateCompletionParams.BuilderA builder for ChatCreateCompletionParams.
public final classChatCreateCompletionParams.Bodypublic final classChatCreateCompletionParams.Message
-
Method Summary
Modifier and Type Method Description final List<ChatCreateCompletionParams.Message>messages()List of messages comprising the conversation final Optional<Boolean>casemarkShowReasoning()CaseMark-only: when true, allows reasoning fields in responses. final Optional<Double>frequencyPenalty()Frequency penalty parameter final Optional<Long>maxTokens()Maximum number of tokens to generate final Optional<String>model()Model to use for completion. final Optional<Double>presencePenalty()Presence penalty parameter final Optional<Boolean>stream()Whether to stream back partial progress final Optional<Double>temperature()Sampling temperature between 0 and 2 final Optional<Double>topP()Nucleus sampling parameter final JsonField<List<ChatCreateCompletionParams.Message>>_messages()Returns the raw JSON value of messages. final JsonField<Boolean>_casemarkShowReasoning()Returns the raw JSON value of casemarkShowReasoning. final JsonField<Double>_frequencyPenalty()Returns the raw JSON value of frequencyPenalty. final JsonField<Long>_maxTokens()Returns the raw JSON value of maxTokens. final JsonField<String>_model()Returns the raw JSON value of model. final JsonField<Double>_presencePenalty()Returns the raw JSON value of presencePenalty. final JsonField<Boolean>_stream()Returns the raw JSON value of stream. final JsonField<Double>_temperature()Returns the raw JSON value of temperature. final JsonField<Double>_topP()Returns the raw JSON value of topP. final Map<String, JsonValue>_additionalBodyProperties()final Headers_additionalHeaders()Additional headers to send with the request. final QueryParams_additionalQueryParams()Additional query param to send with the request. final ChatCreateCompletionParams.BuildertoBuilder()final ChatCreateCompletionParams.Body_body()Headers_headers()The full set of headers in the parameters, including both fixed and additional headers. QueryParams_queryParams()The full set of query params in the parameters, including both fixed and additional query params. Booleanequals(Object other)IntegerhashCode()StringtoString()final static ChatCreateCompletionParams.Builderbuilder()Returns a mutable builder for constructing an instance of ChatCreateCompletionParams. -
-
Method Detail
-
messages
final List<ChatCreateCompletionParams.Message> messages()
List of messages comprising the conversation
-
casemarkShowReasoning
final Optional<Boolean> casemarkShowReasoning()
CaseMark-only: when true, allows reasoning fields in responses. Defaults to false (reasoning is suppressed).
-
frequencyPenalty
final Optional<Double> frequencyPenalty()
Frequency penalty parameter
-
model
final Optional<String> model()
Model to use for completion. Defaults to casemark/core-large if not specified
-
presencePenalty
final Optional<Double> presencePenalty()
Presence penalty parameter
-
temperature
final Optional<Double> temperature()
Sampling temperature between 0 and 2
-
_messages
final JsonField<List<ChatCreateCompletionParams.Message>> _messages()
Returns the raw JSON value of messages.
Unlike messages, this method doesn't throw if the JSON field has an unexpected type.
-
_casemarkShowReasoning
final JsonField<Boolean> _casemarkShowReasoning()
Returns the raw JSON value of casemarkShowReasoning.
Unlike casemarkShowReasoning, this method doesn't throw if the JSON field has an unexpected type.
-
_frequencyPenalty
final JsonField<Double> _frequencyPenalty()
Returns the raw JSON value of frequencyPenalty.
Unlike frequencyPenalty, this method doesn't throw if the JSON field has an unexpected type.
-
_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.
-
_model
final JsonField<String> _model()
Returns the raw JSON value of model.
Unlike model, this method doesn't throw if the JSON field has an unexpected type.
-
_presencePenalty
final JsonField<Double> _presencePenalty()
Returns the raw JSON value of presencePenalty.
Unlike presencePenalty, this method doesn't throw if the JSON field has an unexpected type.
-
_stream
final JsonField<Boolean> _stream()
Returns the raw JSON value of stream.
Unlike stream, this method doesn't throw if the JSON field has an unexpected type.
-
_temperature
final JsonField<Double> _temperature()
Returns the raw JSON value of temperature.
Unlike temperature, this method doesn't throw if the JSON field has an unexpected type.
-
_topP
final JsonField<Double> _topP()
Returns the raw JSON value of topP.
Unlike topP, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalBodyProperties
final Map<String, JsonValue> _additionalBodyProperties()
-
_additionalHeaders
final Headers _additionalHeaders()
Additional headers to send with the request.
-
_additionalQueryParams
final QueryParams _additionalQueryParams()
Additional query param to send with the request.
-
toBuilder
final ChatCreateCompletionParams.Builder toBuilder()
-
_body
final ChatCreateCompletionParams.Body _body()
-
_headers
Headers _headers()
The full set of headers in the parameters, including both fixed and additional headers.
-
_queryParams
QueryParams _queryParams()
The full set of query params in the parameters, including both fixed and additional query params.
-
builder
final static ChatCreateCompletionParams.Builder builder()
Returns a mutable builder for constructing an instance of ChatCreateCompletionParams.
The following fields are required:
.messages()
-
-
-
-