Interface ToolExecutionEligibilityPredicate

All Superinterfaces:
BiPredicate<ChatOptions,ChatResponse>
All Known Implementing Classes:
DefaultToolExecutionEligibilityPredicate

@Deprecated(since="2.0.0", forRemoval=true) public interface ToolExecutionEligibilityPredicate extends BiPredicate<ChatOptions,ChatResponse>
Deprecated, for removal: This API element is subject to removal in a future version.
since 2.0.0 for removal in 3.0.0 — internal tool execution in ChatModel implementations is superseded by org.springframework.ai.chat.client.advisor.ToolCallAdvisor used via org.springframework.ai.chat.client.ChatClient.
Interface for determining when tool execution should be performed based on model responses.
Author:
Christian Tzolov
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    isToolExecutionRequired(ChatOptions promptOptions, ChatResponse chatResponse)
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 2.0.0 for removal in 3.0.0

    Methods inherited from interface java.util.function.BiPredicate

    and, negate, or, test
  • Method Details

    • isToolExecutionRequired

      @Deprecated(since="2.0.0", forRemoval=true) default boolean isToolExecutionRequired(ChatOptions promptOptions, ChatResponse chatResponse)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 2.0.0 for removal in 3.0.0
      Determines if tool execution should be performed based on the prompt options and chat response.
      Parameters:
      promptOptions - The options from the prompt
      chatResponse - The response from the chat model
      Returns:
      true if tool execution should be performed, false otherwise