Package com.sap.ai.sdk.foundationmodels.openai.generated.model

# Interface ChatCompletionToolChoiceOption

All Known Implementing Classes:
  `ChatCompletionToolChoiceOption.InnerChatCompletionNamedToolChoice`, `ChatCompletionToolChoiceOption.InnerString`

public interface ChatCompletionToolChoiceOption
Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool. `none` is the default when no tools are present. `auto` is the default if tools are present.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Interface
  Description
  `static final record`
  `ChatCompletionToolChoiceOption.InnerChatCompletionNamedToolChoice`
  Helper class to create `ChatCompletionNamedToolChoice` that implements `ChatCompletionToolChoiceOption`.
  `static final record`
  `ChatCompletionToolChoiceOption.InnerString`
  Helper class to create `String` that implements `ChatCompletionToolChoiceOption`.

- ## Method Summary

  Static Methods
  Modifier and Type
  Method
  Description
  `static ChatCompletionToolChoiceOption.InnerString`
  `create(String val)`
  Creator to enable deserialization of `String` .
  `static ChatCompletionToolChoiceOption.InnerChatCompletionNamedToolChoice`
  `createInnerChatCompletionNamedToolChoice(ChatCompletionNamedToolChoice val)`
  Creator to enable deserialization of `ChatCompletionNamedToolChoice` .

- ## Method Details

  - ### createInnerChatCompletionNamedToolChoice

    @Nonnull static ChatCompletionToolChoiceOption.InnerChatCompletionNamedToolChoice createInnerChatCompletionNamedToolChoice(@Nonnull ChatCompletionNamedToolChoice val)
    Creator to enable deserialization of `ChatCompletionNamedToolChoice` .
    Parameters:
      `val` - the value to use
    Returns:
      a new instance of `ChatCompletionToolChoiceOption.InnerChatCompletionNamedToolChoice`.

  - ### create

    @Nonnull static ChatCompletionToolChoiceOption.InnerString create(@Nonnull String val)
    Creator to enable deserialization of `String` .
    Parameters:
      `val` - the value to use
    Returns:
      a new instance of `ChatCompletionToolChoiceOption.InnerString`.