Package com.aispect.core.client.model
Record Class Response
java.lang.Object
java.lang.Record
com.aispect.core.client.model.Response
- Record Components:
message- The return message body of this request (may contain only incremental content or complete content)usage- This time called Token consumption measurement object
AI Response encapsulation of model interface calls.
Contains a message generated by a single conversation, as well as the call Token Consumption details. If in streaming output, this structure is often used to represent an incremental slice block (Delta chunk)。
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordAI During the model request process Token Consumption metering entity. -
Constructor Summary
ConstructorsConstructorDescriptionResponse(Message message, Response.Usage usage) Creates an instance of aResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.message()Returns the value of themessagerecord component.final StringtoString()Returns a string representation of this record class.usage()Returns the value of theusagerecord component.
-
Constructor Details
-
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). -
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
usage
Returns the value of theusagerecord component.- Returns:
- the value of the
usagerecord component
-