Class AdvisorParams

java.lang.Object
org.springframework.ai.chat.client.AdvisorParams

public final class AdvisorParams extends Object
Configuration options for the ChatClient request. Preset advisors parameters that can be passed as configuration options to the Advisor context.
Author:
Christian Tzolov
  • Field Details

  • Method Details

    • toolCallAdvisorAutoRegister

      public static Consumer<ChatClient.AdvisorSpec> toolCallAdvisorAutoRegister(boolean enabled)
      Controls whether a ToolCallAdvisor is automatically added to the chain when tools are configured on the ChatClient and no explicit ToolAdvisor is already present. Auto-registration is enabled by default; pass false to opt out:
      
       client.prompt()
           .tools(myTool)
           .advisors(AdvisorParams.toolCallAdvisorAutoRegister(false))
           .call();