FunctionDefinition¶
- class oci.generative_ai_inference.models.FunctionDefinition(**kwargs)¶
Bases:
ToolDefinitionA function the model may call.
Attributes:
A constant which can be used with the type property of a ToolDefinition.
Gets the description of this FunctionDefinition.
Gets the name of this FunctionDefinition.
Gets the parameters of this FunctionDefinition.
[Required] Gets the type of this ToolDefinition.
Methods:
__init__(**kwargs)Initializes a new FunctionDefinition object with values from keyword arguments.
get_subtype(object_dictionary)Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
- TYPE_FUNCTION = 'FUNCTION'¶
A constant which can be used with the type property of a ToolDefinition. This constant has a value of “FUNCTION”
- __init__(**kwargs)¶
Initializes a new FunctionDefinition object with values from keyword arguments. The default value of the
typeattribute of this class isFUNCTIONand it should not be changed. The following keyword arguments are supported (corresponding to the getters/setters of this class):- Parameters
type (str) – The value to assign to the type property of this FunctionDefinition. Allowed values for this property are: “FUNCTION”
name (str) – The value to assign to the name property of this FunctionDefinition.
description (str) – The value to assign to the description property of this FunctionDefinition.
parameters (object) – The value to assign to the parameters property of this FunctionDefinition.
- property description¶
Gets the description of this FunctionDefinition. A description of what the function does, used by the model to choose when and how to call the function.
- Returns
The description of this FunctionDefinition.
- Return type
str
- static get_subtype(object_dictionary)¶
Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
- property name¶
Gets the name of this FunctionDefinition. 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 name of this FunctionDefinition.
- Return type
str
- property parameters¶
Gets the parameters of this FunctionDefinition. The parameters the functions accepts, described as a JSON Schema object. Omitting parameters defines a function with an empty parameter list.
- Returns
The parameters of this FunctionDefinition.
- Return type
object
- property type¶
[Required] Gets the type of this ToolDefinition. The type of the tool.
Allowed values for this property are: “FUNCTION”
- Returns
The type of this ToolDefinition.
- Return type
str