Class ChatCompletionNamedToolChoice
java.lang.Object
com.sap.ai.sdk.foundationmodels.openai.generated.model.ChatCompletionNamedToolChoice
Specifies a tool the model should use. Use to force the model to call a specific function.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe type of the tool. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanSet the function of thisChatCompletionNamedToolChoiceinstance and return the same instance.getCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theChatCompletionNamedToolChoice.Get functiongetType()The type of the tool.inthashCode()voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisChatCompletionNamedToolChoiceinstance.voidSet the function of thisChatCompletionNamedToolChoiceinstance.voidSet the type of thisChatCompletionNamedToolChoiceinstance.toMap()Get the value of all properties of thisChatCompletionNamedToolChoiceinstance including unrecognized properties.toString()Set the type of thisChatCompletionNamedToolChoiceinstance and return the same instance.
-
Constructor Details
-
ChatCompletionNamedToolChoice
public ChatCompletionNamedToolChoice()
-
-
Method Details
-
type
@Nonnull public ChatCompletionNamedToolChoice type(@Nonnull ChatCompletionNamedToolChoice.TypeEnum type) Set the type of thisChatCompletionNamedToolChoiceinstance and return the same instance.- Parameters:
type- The type of the tool. Currently, only `function` is supported.- Returns:
- The same instance of this
ChatCompletionNamedToolChoiceclass
-
getType
The type of the tool. Currently, only `function` is supported.- Returns:
- type The type of this
ChatCompletionNamedToolChoiceinstance.
-
setType
Set the type of thisChatCompletionNamedToolChoiceinstance.- Parameters:
type- The type of the tool. Currently, only `function` is supported.
-
function
@Nonnull public ChatCompletionNamedToolChoice function(@Nonnull ChatCompletionNamedToolChoiceFunction function) Set the function of thisChatCompletionNamedToolChoiceinstance and return the same instance.- Parameters:
function- The function of thisChatCompletionNamedToolChoice- Returns:
- The same instance of this
ChatCompletionNamedToolChoiceclass
-
getFunction
Get function- Returns:
- function The function of this
ChatCompletionNamedToolChoiceinstance.
-
setFunction
Set the function of thisChatCompletionNamedToolChoiceinstance.- Parameters:
function- The function of thisChatCompletionNamedToolChoice
-
getCustomFieldNames
Get the names of the unrecognizable properties of theChatCompletionNamedToolChoice.- Returns:
- The set of properties names
-
getCustomField
@Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException Deprecated.UsetoMap()instead.Get the value of an unrecognizable property of thisChatCompletionNamedToolChoiceinstance.- Parameters:
name- The name of the property- Returns:
- The value of the property
- Throws:
NoSuchElementException- If no property with the given name could be found.
-
toMap
Get the value of all properties of thisChatCompletionNamedToolChoiceinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisChatCompletionNamedToolChoiceinstance. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
customFieldName- The name of the propertycustomFieldValue- The value of the property
-
equals
-
hashCode
public int hashCode() -
toString
-
toMap()instead.