Package com.tnsai.models.agent
Record Class Communication
java.lang.Object
java.lang.Record
com.tnsai.models.agent.Communication
- Record Components:
tone- the emotional tone of responsesformality- the level of formal vs casual languageverbosity- the preferred response length
Represents the communication style and persona of an agent.
Communication style defines how an agent expresses itself when interacting with users or other agents.
Usage Example
Communication style = new Communication(
Tone.FRIENDLY,
Formality.CASUAL,
Verbosity.CONCISE
);
This record is immutable and thread-safe.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCommunication(Tone tone, Formality formality, Verbosity verbosity) Creates an instance of aCommunicationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic CommunicationCreates a default communication style.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theformalityrecord component.Generates a prompt section for LLM.Gets a description of the communication style.final inthashCode()Returns a hash code value for this object.tone()Returns the value of thetonerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theverbosityrecord component.
-
Constructor Details
-
Method Details
-
defaultStyle
Creates a default communication style. -
getDescription
Gets a description of the communication style. -
generatePromptSection
Generates a prompt section for LLM. -
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). -
tone
Returns the value of thetonerecord component.- Returns:
- the value of the
tonerecord component
-
formality
Returns the value of theformalityrecord component.- Returns:
- the value of the
formalityrecord component
-
verbosity
Returns the value of theverbosityrecord component.- Returns:
- the value of the
verbosityrecord component
-