Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1FunctionResponse

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

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) ⇒ GoogleCloudAiplatformV1beta1FunctionResponse

Returns a new instance of GoogleCloudAiplatformV1beta1FunctionResponse.



24677
24678
24679
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24677

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

Instance Attribute Details

#idString

Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call id. Corresponds to the JSON property id

Returns:

  • (String)


24648
24649
24650
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24648

def id
  @id
end

#nameString

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

Returns:

  • (String)


24654
24655
24656
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24654

def name
  @name
end

#partsArray<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1FunctionResponsePart>

Optional. Ordered Parts that constitute a function response. Parts may have different IANA MIME types. Corresponds to the JSON property parts



24660
24661
24662
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24660

def parts
  @parts
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>)


24668
24669
24670
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24668

def response
  @response
end

#schedulingString

Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE. Corresponds to the JSON property scheduling

Returns:

  • (String)


24675
24676
24677
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24675

def scheduling
  @scheduling
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



24682
24683
24684
24685
24686
24687
24688
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24682

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