Record Class OpaquePayload
java.lang.Object
java.lang.Record
org.springframework.ai.chat.messages.part.OpaquePayload
- Record Components:
provider- the provider that produced the payload, for exampleanthropic,openai,google,bedrockkind- the provider's own name for the payload, for examplesignature,encrypted_content,thought_signature,redacted_thinkingdata- the payload, always a string
Provider-owned data attached to a
MessagePart (or to a ReasoningPart)
that Spring AI never interprets and that must be sent back unchanged to the provider
that produced it.
Examples: an Anthropic thinking signature, an OpenAI Responses
encrypted_content, a Gemini thought_signature carried on a function
call. Binary payloads are base64-encoded by the adapter that produced them so that
data is always a plain string.
- Since:
- 2.1.0
- Author:
- Christian Tzolov
-
Constructor Summary
ConstructorsConstructorDescriptionOpaquePayload(String provider, String kind, String data) Creates an instance of aOpaquePayloadrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.provider()Returns the value of theproviderrecord component.final StringtoString()Returns a string representation of this record class.
-
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). -
provider
Returns the value of theproviderrecord component.- Returns:
- the value of the
providerrecord component
-
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-