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:
ChunkedToXContent
- Enclosing class:
StreamingUnifiedChatCompletionResults
public static record StreamingUnifiedChatCompletionResults.Results(Deque<StreamingUnifiedChatCompletionResults.ChatCompletionChunk> chunks)
extends Record
implements ChunkedToXContent
-
Field Summary
Fields inherited from interface org.elasticsearch.common.xcontent.ChunkedToXContent
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aResultsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionchunks()Returns the value of thechunksrecord component.final booleanIndicates whether some other object is "equal to" this one.final 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) 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
-
Constructor Details
-
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
-
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). -
chunks
Returns the value of thechunksrecord component.- Returns:
- the value of the
chunksrecord component
-