Module org.elasticsearch.server
Package org.elasticsearch.inference
Record Class UnifiedCompletionRequest
java.lang.Object
java.lang.Record
org.elasticsearch.inference.UnifiedCompletionRequest
- All Implemented Interfaces:
Writeable
public record UnifiedCompletionRequest(List<UnifiedCompletionRequest.Message> messages, String model, Long maxCompletionTokens, List<String> stop, Float temperature, UnifiedCompletionRequest.ToolChoice toolChoice, List<UnifiedCompletionRequest.Tool> tools, Float topP)
extends Record
implements Writeable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic interfacestatic final recordstatic final recordNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ConstructingObjectParser<UnifiedCompletionRequest, Void> -
Constructor Summary
ConstructorsConstructorDescriptionUnifiedCompletionRequest(List<UnifiedCompletionRequest.Message> messages, String model, Long maxCompletionTokens, List<String> stop, Float temperature, UnifiedCompletionRequest.ToolChoice toolChoice, List<UnifiedCompletionRequest.Tool> tools, Float topP) Creates an instance of aUnifiedCompletionRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static List<NamedWriteableRegistry.Entry> final inthashCode()Returns a hash code value for this object.Returns the value of themaxCompletionTokensrecord component.messages()Returns the value of themessagesrecord component.model()Returns the value of themodelrecord component.static UnifiedCompletionRequestof(List<UnifiedCompletionRequest.Message> messages) stop()Returns the value of thestoprecord component.Returns the value of thetemperaturerecord component.Returns the value of thetoolChoicerecord component.tools()Returns the value of thetoolsrecord component.topP()Returns the value of thetopPrecord component.final StringtoString()Returns a string representation of this record class.voidwriteTo(StreamOutput out) Write this into the StreamOutput.
-
Field Details
-
PARSER
-
-
Constructor Details
-
UnifiedCompletionRequest
- Throws:
IOException
-
UnifiedCompletionRequest
public UnifiedCompletionRequest(List<UnifiedCompletionRequest.Message> messages, @Nullable String model, @Nullable Long maxCompletionTokens, @Nullable List<String> stop, @Nullable Float temperature, @Nullable UnifiedCompletionRequest.ToolChoice toolChoice, @Nullable List<UnifiedCompletionRequest.Tool> tools, @Nullable Float topP) Creates an instance of aUnifiedCompletionRequestrecord class.- Parameters:
messages- the value for themessagesrecord componentmodel- the value for themodelrecord componentmaxCompletionTokens- the value for themaxCompletionTokensrecord componentstop- the value for thestoprecord componenttemperature- the value for thetemperaturerecord componenttoolChoice- the value for thetoolChoicerecord componenttools- the value for thetoolsrecord componenttopP- the value for thetopPrecord component
-
-
Method Details
-
getNamedWriteables
-
of
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
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
-
maxCompletionTokens
Returns the value of themaxCompletionTokensrecord component.- Returns:
- the value of the
maxCompletionTokensrecord component
-
stop
Returns the value of thestoprecord component.- Returns:
- the value of the
stoprecord component
-
temperature
Returns the value of thetemperaturerecord component.- Returns:
- the value of the
temperaturerecord component
-
toolChoice
Returns the value of thetoolChoicerecord component.- Returns:
- the value of the
toolChoicerecord component
-
tools
Returns the value of thetoolsrecord component.- Returns:
- the value of the
toolsrecord component
-
topP
Returns the value of thetopPrecord component.- Returns:
- the value of the
topPrecord component
-