Class ChatCompletionTool
java.lang.Object
com.sap.ai.sdk.foundationmodels.openai.generated.model.ChatCompletionTool
ChatCompletionTool
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanfunction(FunctionObject function) Set the function of thisChatCompletionToolinstance and return the same instance.getCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theChatCompletionTool.Get functiongetType()The type of the tool.inthashCode()voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisChatCompletionToolinstance.voidsetFunction(FunctionObject function) Set the function of thisChatCompletionToolinstance.voidSet the type of thisChatCompletionToolinstance.toMap()Get the value of all properties of thisChatCompletionToolinstance including unrecognized properties.toString()Set the type of thisChatCompletionToolinstance and return the same instance.
-
Constructor Details
-
ChatCompletionTool
public ChatCompletionTool()
-
-
Method Details
-
type
Set the type of thisChatCompletionToolinstance and return the same instance.- Parameters:
type- The type of the tool. Currently, only `function` is supported.- Returns:
- The same instance of this
ChatCompletionToolclass
-
getType
The type of the tool. Currently, only `function` is supported.- Returns:
- type The type of this
ChatCompletionToolinstance.
-
setType
Set the type of thisChatCompletionToolinstance.- Parameters:
type- The type of the tool. Currently, only `function` is supported.
-
function
Set the function of thisChatCompletionToolinstance and return the same instance.- Parameters:
function- The function of thisChatCompletionTool- Returns:
- The same instance of this
ChatCompletionToolclass
-
getFunction
Get function- Returns:
- function The function of this
ChatCompletionToolinstance.
-
setFunction
Set the function of thisChatCompletionToolinstance.- Parameters:
function- The function of thisChatCompletionTool
-
getCustomFieldNames
Get the names of the unrecognizable properties of theChatCompletionTool.- 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 thisChatCompletionToolinstance.- 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 thisChatCompletionToolinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisChatCompletionToolinstance. 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.