Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1FunctionDeclaration
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1FunctionDeclaration
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/aiplatform_v1beta1/classes.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb
Overview
Structured representation of a function declaration as defined by the OpenAPI
3.0 specification. Included in this
declaration are the function name, description, parameters and response type.
This FunctionDeclaration is a representation of a block of code that can be
used as a Tool by the model and executed by the client.
Instance Attribute Summary collapse
-
#behavior ⇒ String
Optional.
-
#description ⇒ String
Optional.
-
#name ⇒ String
Required.
-
#parameters ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Schema
Defines the schema of input and output data.
-
#parameters_json_schema ⇒ Object
Optional.
-
#response ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Schema
Defines the schema of input and output data.
-
#response_json_schema ⇒ Object
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1FunctionDeclaration
constructor
A new instance of GoogleCloudAiplatformV1beta1FunctionDeclaration.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1FunctionDeclaration
Returns a new instance of GoogleCloudAiplatformV1beta1FunctionDeclaration.
24621 24622 24623 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24621 def initialize(**args) update!(**args) end |
Instance Attribute Details
#behavior ⇒ String
Optional. Specifies the function Behavior. If not specified, the system keeps
the current function call behavior. This field is currently only supported by
the BidiGenerateContent method.
Corresponds to the JSON property behavior
24577 24578 24579 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24577 def behavior @behavior end |
#description ⇒ String
Optional. Description and purpose of the function. Model uses it to decide how
and whether to call the function.
Corresponds to the JSON property description
24583 24584 24585 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24583 def description @description end |
#name ⇒ String
Required. The name of the function to call. Must start with a letter or an
underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots, colons and
dashes, with a maximum length of 128.
Corresponds to the JSON property name
24590 24591 24592 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24590 def name @name end |
#parameters ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Schema
Defines the schema of input and output data. This is a subset of the OpenAPI
3.0 Schema Object.
Corresponds to the JSON property parameters
24596 24597 24598 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24596 def parameters @parameters end |
#parameters_json_schema ⇒ Object
Optional. Describes the parameters to the function in JSON Schema format. The
schema must describe an object where the properties are the parameters to the
function. For example: ` "type": "object", "properties": ` "name": ` "type"
: "string" `, "age": ` "type": "integer" ` `, "additionalProperties": false, "
required": ["name", "age"], "propertyOrdering": ["name", "age"] ` This
field is mutually exclusive with parameters.
Corresponds to the JSON property parametersJsonSchema
24606 24607 24608 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24606 def parameters_json_schema @parameters_json_schema end |
#response ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Schema
Defines the schema of input and output data. This is a subset of the OpenAPI
3.0 Schema Object.
Corresponds to the JSON property response
24612 24613 24614 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24612 def response @response end |
#response_json_schema ⇒ Object
Optional. Describes the output from this function in JSON Schema format. The
value specified by the schema is the response value of the function. This
field is mutually exclusive with response.
Corresponds to the JSON property responseJsonSchema
24619 24620 24621 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24619 def response_json_schema @response_json_schema end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
24626 24627 24628 24629 24630 24631 24632 24633 24634 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24626 def update!(**args) @behavior = args[:behavior] if args.key?(:behavior) @description = args[:description] if args.key?(:description) @name = args[:name] if args.key?(:name) @parameters = args[:parameters] if args.key?(:parameters) @parameters_json_schema = args[:parameters_json_schema] if args.key?(:parameters_json_schema) @response = args[:response] if args.key?(:response) @response_json_schema = args[:response_json_schema] if args.key?(:response_json_schema) end |