Record Class AssistantResponse
java.lang.Object
java.lang.Record
ch.tocco.nice2.optional.aiassistant.impl.rest.AssistantResponse
- Record Components:
conversationKey- key of the (new or continued) conversation the turn was stored infunction- the assistant function that produced the turnlabel- the conversation label (auto-generated from the first question)answer- the answer in the requested languagesources- optional citations produced by the function (may be empty)
-
Constructor Summary
ConstructorsConstructorDescriptionAssistantResponse(String conversationKey, String function, String label, String answer, List<ChatResponse.Source> sources) Creates an instance of aAssistantResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionanswer()Returns the value of theanswerrecord component.Returns the value of theconversationKeyrecord component.final booleanIndicates whether some other object is "equal to" this one.function()Returns the value of thefunctionrecord component.final inthashCode()Returns a hash code value for this object.label()Returns the value of thelabelrecord component.sources()Returns the value of thesourcesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AssistantResponse
public AssistantResponse(String conversationKey, String function, String label, String answer, List<ChatResponse.Source> sources) Creates an instance of aAssistantResponserecord class.- Parameters:
conversationKey- the value for theconversationKeyrecord componentfunction- the value for thefunctionrecord componentlabel- the value for thelabelrecord componentanswer- the value for theanswerrecord componentsources- the value for thesourcesrecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
conversationKey
Returns the value of theconversationKeyrecord component.- Returns:
- the value of the
conversationKeyrecord component
-
function
-
label
-
answer
-
sources
-