Package org.openhab.core.voice.text
Record Class InterpreterContext
java.lang.Object
java.lang.Record
org.openhab.core.voice.text.InterpreterContext
@NonNullByDefault
public record InterpreterContext(Conversation conversation, List<LLMTool> tools, @Nullable String locationItem)
extends Record
Context passed to the
HumanLanguageInterpreter
when interpreting a new input text.- Author:
- Miguel Álvarez Díez - Initial contribution
-
Constructor Summary
ConstructorsConstructorDescriptionInterpreterContext(Conversation conversation, List<LLMTool> tools, @Nullable String locationItem) Creates an instance of aInterpreterContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconversationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable StringReturns the value of thelocationItemrecord component.tools()Returns the value of thetoolsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
InterpreterContext
public InterpreterContext(Conversation conversation, List<LLMTool> tools, @Nullable String locationItem) Creates an instance of aInterpreterContextrecord class.- Parameters:
conversation- the value for theconversationrecord componenttools- the value for thetoolsrecord componentlocationItem- the value for thelocationItemrecord 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). -
conversation
Returns the value of theconversationrecord component.- Returns:
- the value of the
conversationrecord component
-
tools
Returns the value of thetoolsrecord component.- Returns:
- the value of the
toolsrecord component
-
locationItem
Returns the value of thelocationItemrecord component.- Returns:
- the value of the
locationItemrecord component
-