Record Class CreateChatCompletionRequest
java.lang.Object
java.lang.Record
io.github.stefanbratanov.jvm.openai.CreateChatCompletionRequest
- Record Components:
toolChoice
-String
orToolChoice
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<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 class
static 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<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 aCreateChatCompletionRequest
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefrequencyPenalty
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of thelogitBias
record component.logprobs()
Returns the value of thelogprobs
record component.Returns the value of themaxTokens
record component.messages()
Returns the value of themessages
record component.model()
Returns the value of themodel
record component.n()
Returns the value of then
record component.Returns the value of theparallelToolCalls
record component.Returns the value of thepresencePenalty
record component.Returns the value of theresponseFormat
record component.seed()
Returns the value of theseed
record component.stop()
Returns the value of thestop
record component.stream()
Returns the value of thestream
record component.Returns the value of thestreamOptions
record component.Returns the value of thetemperature
record component.Returns the value of thetoolChoice
record component.tools()
Returns the value of thetools
record component.Returns the value of thetopLogprobs
record component.topP()
Returns the value of thetopP
record component.final String
toString()
Returns a string representation of this record class.user()
Returns the value of theuser
record 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<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 aCreateChatCompletionRequest
record class.- Parameters:
messages
- the value for themessages
record componentmodel
- the value for themodel
record componentfrequencyPenalty
- the value for thefrequencyPenalty
record componentlogitBias
- the value for thelogitBias
record componentlogprobs
- the value for thelogprobs
record componenttopLogprobs
- the value for thetopLogprobs
record componentmaxTokens
- the value for themaxTokens
record componentn
- the value for then
record componentpresencePenalty
- the value for thepresencePenalty
record componentresponseFormat
- the value for theresponseFormat
record componentseed
- the value for theseed
record componentstop
- the value for thestop
record componentstream
- the value for thestream
record componentstreamOptions
- the value for thestreamOptions
record componenttemperature
- the value for thetemperature
record componenttopP
- the value for thetopP
record componenttools
- the value for thetools
record componenttoolChoice
- the value for thetoolChoice
record componentparallelToolCalls
- the value for theparallelToolCalls
record componentuser
- the value for theuser
record 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 themessages
record component.- Returns:
- the value of the
messages
record component
-
model
Returns the value of themodel
record component.- Returns:
- the value of the
model
record component
-
frequencyPenalty
Returns the value of thefrequencyPenalty
record component.- Returns:
- the value of the
frequencyPenalty
record component
-
logitBias
Returns the value of thelogitBias
record component.- Returns:
- the value of the
logitBias
record component
-
logprobs
Returns the value of thelogprobs
record component.- Returns:
- the value of the
logprobs
record component
-
topLogprobs
Returns the value of thetopLogprobs
record component.- Returns:
- the value of the
topLogprobs
record component
-
maxTokens
Returns the value of themaxTokens
record component.- Returns:
- the value of the
maxTokens
record component
-
n
Returns the value of then
record component.- Returns:
- the value of the
n
record component
-
presencePenalty
Returns the value of thepresencePenalty
record component.- Returns:
- the value of the
presencePenalty
record component
-
responseFormat
Returns the value of theresponseFormat
record component.- Returns:
- the value of the
responseFormat
record component
-
seed
Returns the value of theseed
record component.- Returns:
- the value of the
seed
record component
-
stop
Returns the value of thestop
record component.- Returns:
- the value of the
stop
record component
-
stream
Returns the value of thestream
record component.- Returns:
- the value of the
stream
record component
-
streamOptions
Returns the value of thestreamOptions
record component.- Returns:
- the value of the
streamOptions
record component
-
temperature
Returns the value of thetemperature
record component.- Returns:
- the value of the
temperature
record component
-
topP
Returns the value of thetopP
record component.- Returns:
- the value of the
topP
record component
-
tools
Returns the value of thetools
record component.- Returns:
- the value of the
tools
record component
-
toolChoice
Returns the value of thetoolChoice
record component.- Returns:
- the value of the
toolChoice
record component
-
parallelToolCalls
Returns the value of theparallelToolCalls
record component.- Returns:
- the value of the
parallelToolCalls
record component
-
user
Returns the value of theuser
record component.- Returns:
- the value of the
user
record component
-