Record Class CreateChatCompletionRequest
java.lang.Object
java.lang.Record
io.github.stefanbratanov.jvm.openai.CreateChatCompletionRequest
- Record Components:
toolChoice-StringorToolChoice
public record CreateChatCompletionRequest(List<ChatMessage> messages, String model, Optional<Double> frequencyPenalty, Optional<Map<Integer,Integer>> logitBias, Optional<Boolean> logprobs, Optional<Integer> topLogprobs, Optional<Integer> maxTokens, Optional<Integer> n, Optional<Double> presencePenalty, Optional<ResponseFormat> responseFormat, Optional<Integer> seed, Optional<String> serviceTier, Optional<List<String>> stop, Optional<Boolean> stream, Optional<CreateChatCompletionRequest.StreamOptions> streamOptions, Optional<Double> temperature, Optional<Double> topP, Optional<List<Tool>> tools, Optional<Object> toolChoice, Optional<Boolean> parallelToolCalls, Optional<String> user)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final record -
Constructor Summary
ConstructorsConstructorDescriptionCreateChatCompletionRequest(List<ChatMessage> messages, String model, Optional<Double> frequencyPenalty, Optional<Map<Integer, Integer>> logitBias, Optional<Boolean> logprobs, Optional<Integer> topLogprobs, Optional<Integer> maxTokens, Optional<Integer> n, Optional<Double> presencePenalty, Optional<ResponseFormat> responseFormat, Optional<Integer> seed, Optional<String> serviceTier, Optional<List<String>> stop, Optional<Boolean> stream, Optional<CreateChatCompletionRequest.StreamOptions> streamOptions, Optional<Double> temperature, Optional<Double> topP, Optional<List<Tool>> tools, Optional<Object> toolChoice, Optional<Boolean> parallelToolCalls, Optional<String> user) Creates an instance of aCreateChatCompletionRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefrequencyPenaltyrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thelogitBiasrecord component.logprobs()Returns the value of thelogprobsrecord component.Returns the value of themaxTokensrecord component.messages()Returns the value of themessagesrecord component.model()Returns the value of themodelrecord component.n()Returns the value of thenrecord component.Returns the value of theparallelToolCallsrecord component.Returns the value of thepresencePenaltyrecord component.Returns the value of theresponseFormatrecord component.seed()Returns the value of theseedrecord component.Returns the value of theserviceTierrecord component.stop()Returns the value of thestoprecord component.stream()Returns the value of thestreamrecord component.Returns the value of thestreamOptionsrecord component.Returns the value of thetemperaturerecord component.Returns the value of thetoolChoicerecord component.tools()Returns the value of thetoolsrecord component.Returns the value of thetopLogprobsrecord component.topP()Returns the value of thetopPrecord component.final StringtoString()Returns a string representation of this record class.user()Returns the value of theuserrecord component.
-
Constructor Details
-
CreateChatCompletionRequest
public CreateChatCompletionRequest(List<ChatMessage> messages, String model, Optional<Double> frequencyPenalty, Optional<Map<Integer, Integer>> logitBias, Optional<Boolean> logprobs, Optional<Integer> topLogprobs, Optional<Integer> maxTokens, Optional<Integer> n, Optional<Double> presencePenalty, Optional<ResponseFormat> responseFormat, Optional<Integer> seed, Optional<String> serviceTier, Optional<List<String>> stop, Optional<Boolean> stream, Optional<CreateChatCompletionRequest.StreamOptions> streamOptions, Optional<Double> temperature, Optional<Double> topP, Optional<List<Tool>> tools, Optional<Object> toolChoice, Optional<Boolean> parallelToolCalls, Optional<String> user) Creates an instance of aCreateChatCompletionRequestrecord class.- Parameters:
messages- the value for themessagesrecord componentmodel- the value for themodelrecord componentfrequencyPenalty- the value for thefrequencyPenaltyrecord componentlogitBias- the value for thelogitBiasrecord componentlogprobs- the value for thelogprobsrecord componenttopLogprobs- the value for thetopLogprobsrecord componentmaxTokens- the value for themaxTokensrecord componentn- the value for thenrecord componentpresencePenalty- the value for thepresencePenaltyrecord componentresponseFormat- the value for theresponseFormatrecord componentseed- the value for theseedrecord componentserviceTier- the value for theserviceTierrecord componentstop- the value for thestoprecord componentstream- the value for thestreamrecord componentstreamOptions- the value for thestreamOptionsrecord componenttemperature- the value for thetemperaturerecord componenttopP- the value for thetopPrecord componenttools- the value for thetoolsrecord componenttoolChoice- the value for thetoolChoicerecord componentparallelToolCalls- the value for theparallelToolCallsrecord componentuser- the value for theuserrecord component
-
-
Method Details
-
newBuilder
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
messages
Returns the value of themessagesrecord component.- Returns:
- the value of the
messagesrecord component
-
model
Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
frequencyPenalty
Returns the value of thefrequencyPenaltyrecord component.- Returns:
- the value of the
frequencyPenaltyrecord component
-
logitBias
Returns the value of thelogitBiasrecord component.- Returns:
- the value of the
logitBiasrecord component
-
logprobs
Returns the value of thelogprobsrecord component.- Returns:
- the value of the
logprobsrecord component
-
topLogprobs
Returns the value of thetopLogprobsrecord component.- Returns:
- the value of the
topLogprobsrecord component
-
maxTokens
Returns the value of themaxTokensrecord component.- Returns:
- the value of the
maxTokensrecord component
-
n
Returns the value of thenrecord component.- Returns:
- the value of the
nrecord component
-
presencePenalty
Returns the value of thepresencePenaltyrecord component.- Returns:
- the value of the
presencePenaltyrecord component
-
responseFormat
Returns the value of theresponseFormatrecord component.- Returns:
- the value of the
responseFormatrecord component
-
seed
Returns the value of theseedrecord component.- Returns:
- the value of the
seedrecord component
-
serviceTier
Returns the value of theserviceTierrecord component.- Returns:
- the value of the
serviceTierrecord component
-
stop
Returns the value of thestoprecord component.- Returns:
- the value of the
stoprecord component
-
stream
Returns the value of thestreamrecord component.- Returns:
- the value of the
streamrecord component
-
streamOptions
Returns the value of thestreamOptionsrecord component.- Returns:
- the value of the
streamOptionsrecord component
-
temperature
Returns the value of thetemperaturerecord component.- Returns:
- the value of the
temperaturerecord component
-
topP
Returns the value of thetopPrecord component.- Returns:
- the value of the
topPrecord component
-
tools
Returns the value of thetoolsrecord component.- Returns:
- the value of the
toolsrecord component
-
toolChoice
Returns the value of thetoolChoicerecord component.- Returns:
- the value of the
toolChoicerecord component
-
parallelToolCalls
Returns the value of theparallelToolCallsrecord component.- Returns:
- the value of the
parallelToolCallsrecord component
-
user
Returns the value of theuserrecord component.- Returns:
- the value of the
userrecord component
-