Module org.elasticsearch.xcore
Record Class StreamingUnifiedChatCompletionResults.Results
java.lang.Object
java.lang.Record
org.elasticsearch.xpack.core.inference.results.StreamingUnifiedChatCompletionResults.Results
- All Implemented Interfaces:
NamedWriteable,Writeable,ChunkedToXContent,InferenceServiceResults.Result
- Enclosing class:
StreamingUnifiedChatCompletionResults
public static record StreamingUnifiedChatCompletionResults.Results(Deque<StreamingUnifiedChatCompletionResults.ChatCompletionChunk> chunks)
extends Record
implements InferenceServiceResults.Result
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from interface org.elasticsearch.common.xcontent.ChunkedToXContent
EMPTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchunks()Returns the value of thechunksrecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.Iterator<? extends org.elasticsearch.xcontent.ToXContent> toXContentChunked(org.elasticsearch.xcontent.ToXContent.Params params) voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.common.xcontent.ChunkedToXContent
isFragment, toXContentChunkedV7
-
Field Details
-
NAME
-
-
Constructor Details
-
Results
- Throws:
IOException
-
Results
Creates an instance of aResultsrecord class.- Parameters:
chunks- the value for thechunksrecord component
-
-
Method Details
-
toXContentChunked
public Iterator<? extends org.elasticsearch.xcontent.ToXContent> toXContentChunked(org.elasticsearch.xcontent.ToXContent.Params params) - Specified by:
toXContentChunkedin interfaceChunkedToXContent
-
getWriteableName
- Specified by:
getWriteableNamein interfaceNamedWriteable
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
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). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. -
chunks
Returns the value of thechunksrecord component.- Returns:
- the value of the
chunksrecord component
-