Record Class ToolContext
java.lang.Object
java.lang.Record
com.suncode.pwfl.ai.tool.ToolContext
- Record Components:
inputResponse- the user's answer when the tool is called again afterToolInputRequiredException;nullon the first call
@Api
public record ToolContext(String username, ToolChannel channel, boolean uiContextPresent, ToolInputResponse inputResponse)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionToolContext(String username, ToolChannel channel, boolean uiContextPresent, ToolInputResponse inputResponse) Creates an instance of aToolContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionchannel()Returns the value of thechannelrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinputResponserecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theuiContextPresentrecord component.username()Returns the value of theusernamerecord component.
-
Constructor Details
-
ToolContext
public ToolContext(String username, ToolChannel channel, boolean uiContextPresent, ToolInputResponse inputResponse) Creates an instance of aToolContextrecord class.- Parameters:
username- the value for theusernamerecord componentchannel- the value for thechannelrecord componentuiContextPresent- the value for theuiContextPresentrecord componentinputResponse- the value for theinputResponserecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
username
Returns the value of theusernamerecord component.- Returns:
- the value of the
usernamerecord component
-
channel
Returns the value of thechannelrecord component.- Returns:
- the value of the
channelrecord component
-
uiContextPresent
public boolean uiContextPresent()Returns the value of theuiContextPresentrecord component.- Returns:
- the value of the
uiContextPresentrecord component
-
inputResponse
Returns the value of theinputResponserecord component.- Returns:
- the value of the
inputResponserecord component
-