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 interface
static final record
static final record
static final record
static final record
static final record
static final record
static interface
static final record
static final record
Nested 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 aUnifiedCompletionRequest
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.static List
<NamedWriteableRegistry.Entry> final int
hashCode()
Returns a hash code value for this object.Returns the value of themaxCompletionTokens
record component.messages()
Returns the value of themessages
record component.model()
Returns the value of themodel
record component.static UnifiedCompletionRequest
of
(List<UnifiedCompletionRequest.Message> messages) stop()
Returns the value of thestop
record component.Returns the value of thetemperature
record component.Returns the value of thetoolChoice
record component.tools()
Returns the value of thetools
record component.topP()
Returns the value of thetopP
record component.final String
toString()
Returns a string representation of this record class.void
writeTo
(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 aUnifiedCompletionRequest
record class.- Parameters:
messages
- the value for themessages
record componentmodel
- the value for themodel
record componentmaxCompletionTokens
- the value for themaxCompletionTokens
record componentstop
- the value for thestop
record componenttemperature
- the value for thetemperature
record componenttoolChoice
- the value for thetoolChoice
record componenttools
- the value for thetools
record componenttopP
- the value for thetopP
record component
-
-
Method Details
-
getNamedWriteables
-
of
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in 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 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
-
maxCompletionTokens
Returns the value of themaxCompletionTokens
record component.- Returns:
- the value of the
maxCompletionTokens
record component
-
stop
Returns the value of thestop
record component.- Returns:
- the value of the
stop
record component
-
temperature
Returns the value of thetemperature
record component.- Returns:
- the value of the
temperature
record component
-
toolChoice
Returns the value of thetoolChoice
record component.- Returns:
- the value of the
toolChoice
record component
-
tools
Returns the value of thetools
record component.- Returns:
- the value of the
tools
record component
-
topP
Returns the value of thetopP
record component.- Returns:
- the value of the
topP
record component
-