Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1FunctionDeclaration
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1::GoogleCloudAiplatformV1FunctionDeclaration
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/aiplatform_v1/classes.rb,
lib/google/apis/aiplatform_v1/representations.rb,
lib/google/apis/aiplatform_v1/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
-
#description ⇒ String
Optional.
-
#name ⇒ String
Required.
-
#parameters ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Schema
Schema is used to define the format of input/output data.
-
#parameters_json_schema ⇒ Object
Optional.
-
#response ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Schema
Schema is used to define the format of input/output data.
-
#response_json_schema ⇒ Object
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1FunctionDeclaration
constructor
A new instance of GoogleCloudAiplatformV1FunctionDeclaration.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1FunctionDeclaration
Returns a new instance of GoogleCloudAiplatformV1FunctionDeclaration.
12405 12406 12407 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12405 def initialize(**args) update!(**args) end |
Instance Attribute Details
#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
12365 12366 12367 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12365 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 and dashes,
with a maximum length of 64.
Corresponds to the JSON property name
12372 12373 12374 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12372 def name @name end |
#parameters ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Schema
Schema is used to define the format of input/output data. Represents a select
subset of an OpenAPI 3.0 schema object. More fields may be added in the future as needed.
Corresponds to the JSON property parameters
12379 12380 12381 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12379 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
12389 12390 12391 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12389 def parameters_json_schema @parameters_json_schema end |
#response ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Schema
Schema is used to define the format of input/output data. Represents a select
subset of an OpenAPI 3.0 schema object. More fields may be added in the future as needed.
Corresponds to the JSON property response
12396 12397 12398 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12396 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
12403 12404 12405 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12403 def response_json_schema @response_json_schema end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
12410 12411 12412 12413 12414 12415 12416 12417 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12410 def update!(**args) @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 |