Interface ToolExecutionEligibilityChecker
- All Superinterfaces:
Function<ChatResponse,Boolean>
Interface for determining when tool execution should be performed based on model
responses.
- Author:
- Christian Tzolov
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanisInternalToolExecutionEnabled(ChatOptions chatOptions) Determines if tool execution should be performed by the Spring AI or by the client.default booleanisToolCallResponse(ChatResponse chatResponse) Determines if the response is a tool call message response.default booleanisToolExecutionRequired(ChatOptions promptOptions, ChatResponse chatResponse) Determines if tool execution should be performed based on the prompt options and chat response.
-
Method Details
-
isToolExecutionRequired
Determines if tool execution should be performed based on the prompt options and chat response.- Parameters:
promptOptions- The options from the promptchatResponse- The response from the chat model- Returns:
- true if tool execution should be performed, false otherwise
-
isToolCallResponse
Determines if the response is a tool call message response.- Parameters:
chatResponse- The response from the chat model call- Returns:
- true if the response is a tool call message response, false otherwise
-
isInternalToolExecutionEnabled
Determines if tool execution should be performed by the Spring AI or by the client.- Parameters:
chatOptions- The options from the chat- Returns:
- true if tool execution should be performed by Spring AI, false if it should be performed by the client
-