Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1FunctionResponse

Inherits:
Object
  • Object
show all
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

The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1FunctionResponse

Returns a new instance of GoogleCloudAiplatformV1FunctionResponse.



10527
10528
10529
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10527

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#nameString

Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. Corresponds to the JSON property name

Returns:

  • (String)


10517
10518
10519
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10517

def name
  @name
end

#responseHash<String,Object>

Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If " output" and "error" keys are not specified, then whole "response" is treated as function output. Corresponds to the JSON property response

Returns:

  • (Hash<String,Object>)


10525
10526
10527
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10525

def response
  @response
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



10532
10533
10534
10535
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10532

def update!(**args)
  @name = args[:name] if args.key?(:name)
  @response = args[:response] if args.key?(:response)
end