Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Tool

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

Tool details that the model may use to generate response. A Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1Tool

Returns a new instance of GoogleCloudAiplatformV1Tool.



37130
37131
37132
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37130

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

Instance Attribute Details

#code_executionGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1ToolCodeExecution

Tool that executes code generated by the model, and automatically returns the result to the model. See also [ExecutableCode]and [CodeExecutionResult] which are input and output to this tool. Corresponds to the JSON property codeExecution



37096
37097
37098
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37096

def code_execution
  @code_execution
end

#enterprise_web_searchGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1EnterpriseWebSearch

Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. Corresponds to the JSON property enterpriseWebSearch



37102
37103
37104
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37102

def enterprise_web_search
  @enterprise_web_search
end

#function_declarationsArray<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1FunctionDeclaration>

Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 128 function declarations can be provided. Corresponds to the JSON property functionDeclarations



37112
37113
37114
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37112

def function_declarations
  @function_declarations
end

#google_searchGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1ToolGoogleSearch

GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. Corresponds to the JSON property googleSearch



37118
37119
37120
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37118

def google_search
  @google_search
end

#google_search_retrievalGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1GoogleSearchRetrieval

Tool to retrieve public web data for grounding, powered by Google. Corresponds to the JSON property googleSearchRetrieval



37123
37124
37125
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37123

def google_search_retrieval
  @google_search_retrieval
end

#retrievalGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1Retrieval

Defines a retrieval tool that model can call to access external knowledge. Corresponds to the JSON property retrieval



37128
37129
37130
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37128

def retrieval
  @retrieval
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



37135
37136
37137
37138
37139
37140
37141
37142
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 37135

def update!(**args)
  @code_execution = args[:code_execution] if args.key?(:code_execution)
  @enterprise_web_search = args[:enterprise_web_search] if args.key?(:enterprise_web_search)
  @function_declarations = args[:function_declarations] if args.key?(:function_declarations)
  @google_search = args[:google_search] if args.key?(:google_search)
  @google_search_retrieval = args[:google_search_retrieval] if args.key?(:google_search_retrieval)
  @retrieval = args[:retrieval] if args.key?(:retrieval)
end