Record Class ToolSearchRequest
java.lang.Object
java.lang.Record
org.springframework.ai.tool.toolsearch.ToolSearchRequest
- Record Components:
sessionId- identifies the session whose tool index is searchedquery- natural-language description of the needed capabilitymaxResults- maximum number of results to return;nulllets the tool index apply its own defaultcategoryFilter- optional hint to narrow the search to a specific tool category; support depends on theorg.springframework.ai.chat.client.advisor.toolsearch.ToolIndeximplementation
public record ToolSearchRequest(String sessionId, String query, @Nullable Integer maxResults, @Nullable String categoryFilter)
extends Record
Request for searching tools within a session's index.
- Since:
- 2.0.0
- Author:
- Christian Tzolov
-
Constructor Summary
ConstructorsConstructorDescriptionToolSearchRequest(String sessionId, String query, @Nullable Integer maxResults, @Nullable String categoryFilter) Creates an instance of aToolSearchRequestrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable StringReturns the value of thecategoryFilterrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable IntegerReturns the value of themaxResultsrecord component.query()Returns the value of thequeryrecord component.Returns the value of thesessionIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ToolSearchRequest
public ToolSearchRequest(String sessionId, String query, @Nullable Integer maxResults, @Nullable String categoryFilter) Creates an instance of aToolSearchRequestrecord class.- Parameters:
sessionId- the value for thesessionIdrecord componentquery- the value for thequeryrecord componentmaxResults- the value for themaxResultsrecord componentcategoryFilter- the value for thecategoryFilterrecord 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). -
sessionId
Returns the value of thesessionIdrecord component.- Returns:
- the value of the
sessionIdrecord component
-
query
Returns the value of thequeryrecord component.- Returns:
- the value of the
queryrecord component
-
maxResults
Returns the value of themaxResultsrecord component.- Returns:
- the value of the
maxResultsrecord component
-
categoryFilter
Returns the value of thecategoryFilterrecord component.- Returns:
- the value of the
categoryFilterrecord component
-