Interface ToolExecutionEligibilityPredicate

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

public interface ToolExecutionEligibilityPredicate extends BiPredicate<ChatOptions,ChatResponse>
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)
    Determines if tool execution should be performed based on the prompt options and chat response.

    Methods inherited from interface java.util.function.BiPredicate

    and, negate, or, test
  • Method Details

    • isToolExecutionRequired

      default boolean isToolExecutionRequired(ChatOptions promptOptions, ChatResponse chatResponse)
      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