Package io.quarkiverse.mcp.server
Record Class SamplingResponse
java.lang.Object
java.lang.Record
io.quarkiverse.mcp.server.SamplingResponse
- Record Components:
content- (must not benull)model- The name of the model that generated the message (must not benull)role- (must not benull)stopReason- The reason why sampling stopped, if knownmeta- (must not benull)
public record SamplingResponse(Content content, String model, Role role, String stopReason, Meta meta)
extends Record
A response to a
SamplingRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncontent()Returns the value of thecontentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.meta()Returns the value of themetarecord component.model()Returns the value of themodelrecord component.role()Returns the value of therolerecord component.Returns the value of thestopReasonrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SamplingResponse
Creates an instance of aSamplingResponserecord class.- Parameters:
content- the value for thecontentrecord componentmodel- the value for themodelrecord componentrole- the value for therolerecord componentstopReason- the value for thestopReasonrecord componentmeta- the value for themetarecord component
-
-
Method Details
-
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). -
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-
model
Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
role
Returns the value of therolerecord component.- Returns:
- the value of the
rolerecord component
-
stopReason
Returns the value of thestopReasonrecord component.- Returns:
- the value of the
stopReasonrecord component
-
meta
Returns the value of themetarecord component.- Returns:
- the value of the
metarecord component
-