Class FunctionDefinition
- java.lang.Object
-
- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
- com.oracle.bmc.generativeaiinference.model.ToolDefinition
-
- com.oracle.bmc.generativeaiinference.model.FunctionDefinition
-
@Generated(value="OracleSDKGenerator", comments="API Version: 20231130") public final class FunctionDefinition extends ToolDefinitionA function the model may call.
Note: Objects should always be created or deserialized using theFunctionDefinition.Builder. This model distinguishes fields that are null because they are unset from fields that are explicitly set to null. This is done in the setter methods of theFunctionDefinition.Builder, which maintain a set of all explicitly set fields calledFunctionDefinition.Builder.__explicitlySet__. ThehashCode()andequals(Object)methods are implemented to take the explicitly set fields into account. The constructor, on the other hand, does not take the explicitly set fields into account (since the constructor cannot distinguish explicit null from unset null).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFunctionDefinition.Builder-
Nested classes/interfaces inherited from class com.oracle.bmc.generativeaiinference.model.ToolDefinition
ToolDefinition.Type
-
-
Constructor Summary
Constructors Constructor Description FunctionDefinition(String name, String description, Object parameters)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FunctionDefinition.Builderbuilder()Create a new builder.booleanequals(Object o)StringgetDescription()A description of what the function does, used by the model to choose when and how to call the function.StringgetName()The name of the function to be called.ObjectgetParameters()The parameters the functions accepts, described as a JSON Schema object.inthashCode()FunctionDefinition.BuildertoBuilder()StringtoString()StringtoString(boolean includeByteArrayContents)Return a string representation of the object.
-
-
-
Constructor Detail
-
FunctionDefinition
@Deprecated public FunctionDefinition(String name, String description, Object parameters)
Deprecated.
-
-
Method Detail
-
builder
public static FunctionDefinition.Builder builder()
Create a new builder.
-
toBuilder
public FunctionDefinition.Builder toBuilder()
-
getName
public String 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:
- the value
-
getDescription
public String getDescription()
A description of what the function does, used by the model to choose when and how to call the function.- Returns:
- the value
-
getParameters
public Object getParameters()
The parameters the functions accepts, described as a JSON Schema object.Omitting parameters defines a function with an empty parameter list.
- Returns:
- the value
-
toString
public String toString()
- Overrides:
toStringin classToolDefinition
-
toString
public String toString(boolean includeByteArrayContents)
Return a string representation of the object.- Overrides:
toStringin classToolDefinition- Parameters:
includeByteArrayContents- true to include the full contents of byte arrays- Returns:
- string representation
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classToolDefinition
-
hashCode
public int hashCode()
- Overrides:
hashCodein classToolDefinition
-
-