Class FunctionObject
java.lang.Object
com.sap.ai.sdk.foundationmodels.openai.generated.model.FunctionObject
FunctionObject
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondescription(String description) Set the description of thisFunctionObjectinstance and return the same instance.booleangetCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theFunctionObject.A description of what the function does, used by the model to choose when and how to call the function.getName()The name of the function to be called.The parameters the functions accepts, described as a JSON Schema object.inthashCode()isStrict()Whether to enable strict schema adherence when generating the function call.Set the name of thisFunctionObjectinstance and return the same instance.parameters(Map<String, Object> parameters) Set the parameters of thisFunctionObjectinstance and return the same instance.putparametersItem(String key, Object parametersItem) Put one parameters instance to thisFunctionObjectinstance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisFunctionObjectinstance.voidsetDescription(String description) Set the description of thisFunctionObjectinstance.voidSet the name of thisFunctionObjectinstance.voidsetParameters(Map<String, Object> parameters) Set the parameters of thisFunctionObjectinstance.voidSet the strict of thisFunctionObjectinstance.Set the strict of thisFunctionObjectinstance and return the same instance.toMap()Get the value of all properties of thisFunctionObjectinstance including unrecognized properties.toString()
-
Constructor Details
-
FunctionObject
public FunctionObject()
-
-
Method Details
-
description
Set the description of thisFunctionObjectinstance and return the same instance.- Parameters:
description- A description of what the function does, used by the model to choose when and how to call the function.- Returns:
- The same instance of this
FunctionObjectclass
-
getDescription
A description of what the function does, used by the model to choose when and how to call the function.- Returns:
- description The description of this
FunctionObjectinstance.
-
setDescription
Set the description of thisFunctionObjectinstance.- Parameters:
description- A description of what the function does, used by the model to choose when and how to call the function.
-
name
Set the name of thisFunctionObjectinstance and return the same instance.- Parameters:
name- The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.- Returns:
- The same instance of this
FunctionObjectclass
-
getName
The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.- Returns:
- name The name of this
FunctionObjectinstance.
-
setName
Set the name of thisFunctionObjectinstance.- Parameters:
name- The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
-
parameters
Set the parameters of thisFunctionObjectinstance and return the same instance.- Parameters:
parameters- The parameters the functions accepts, described as a JSON Schema object. See the guide](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. Omitting `parameters` defines a function with an empty parameter list.- Returns:
- The same instance of this
FunctionObjectclass
-
putparametersItem
@Nonnull public FunctionObject putparametersItem(@Nonnull String key, @Nullable Object parametersItem) Put one parameters instance to thisFunctionObjectinstance.- Parameters:
key- The String key of this parameters instanceparametersItem- The parameters that should be added under the given key- Returns:
- The same instance of type
FunctionObject
-
getParameters
The parameters the functions accepts, described as a JSON Schema object. See the guide](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. Omitting `parameters` defines a function with an empty parameter list.- Returns:
- parameters The parameters of this
FunctionObjectinstance.
-
setParameters
Set the parameters of thisFunctionObjectinstance.- Parameters:
parameters- The parameters the functions accepts, described as a JSON Schema object. See the guide](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. Omitting `parameters` defines a function with an empty parameter list.
-
strict
Set the strict of thisFunctionObjectinstance and return the same instance.- Parameters:
strict- Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).- Returns:
- The same instance of this
FunctionObjectclass
-
isStrict
Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).- Returns:
- strict The strict of this
FunctionObjectinstance.
-
setStrict
Set the strict of thisFunctionObjectinstance.- Parameters:
strict- Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).
-
getCustomFieldNames
Get the names of the unrecognizable properties of theFunctionObject.- 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 thisFunctionObjectinstance.- 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 thisFunctionObjectinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisFunctionObjectinstance. 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.