Class ZhiPuAiApi.ChatCompletionRequest.ToolChoiceBuilder

java.lang.Object
org.springframework.ai.zhipuai.api.ZhiPuAiApi.ChatCompletionRequest.ToolChoiceBuilder
Enclosing class:
ZhiPuAiApi.ChatCompletionRequest

public static class ZhiPuAiApi.ChatCompletionRequest.ToolChoiceBuilder extends Object
Helper factory that creates a tool_choice of type 'none', 'auto' or selected function by name.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Model can pick between generating a message or calling a function.
    static final String
    Model will not call a function and instead generates a message
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Object
    function(String functionName)
    Specifying a particular function forces the model to call that function.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • AUTO

      public static final String AUTO
      Model can pick between generating a message or calling a function.
      See Also:
    • NONE

      public static final String NONE
      Model will not call a function and instead generates a message
      See Also:
  • Constructor Details

    • ToolChoiceBuilder

      public ToolChoiceBuilder()
  • Method Details

    • function

      public static Object function(String functionName)
      Specifying a particular function forces the model to call that function.