Class OpenAiToolChoice

java.lang.Object
com.sap.ai.sdk.foundationmodels.openai.OpenAiToolChoice

public class OpenAiToolChoice extends Object
OpenAi ToolChoice to specify whether to call which tool.
Since:
1.4.0
  • Field Details

    • NONE

      public static final OpenAiToolChoice NONE
      Only message generation will be performed without calling any tool.
    • OPTIONAL

      public static final OpenAiToolChoice OPTIONAL
      The model may decide whether to call a (one or more) tool.
    • REQUIRED

      public static final OpenAiToolChoice REQUIRED
      The model must call one or more tools as part of its processing.
  • Constructor Details

  • Method Details

    • function

      @Nonnull public static OpenAiToolChoice function(@Nonnull String functionName)
      The model must call the function specified by functionName.
      Parameters:
      functionName - the name of the function that must be called.
      Returns:
      the OpenAI tool choice.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object