Class: Google::Apis::CesV1::GoogleSearchTool

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/ces_v1/classes.rb,
lib/google/apis/ces_v1/representations.rb,
lib/google/apis/ces_v1/representations.rb

Overview

Represents a tool to perform Google web searches for grounding. See https:// cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool#google- search.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleSearchTool

Returns a new instance of GoogleSearchTool.



3711
3712
3713
# File 'lib/google/apis/ces_v1/classes.rb', line 3711

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

Instance Attribute Details

#context_urlsArray<String>

Optional. Content will be fetched directly from these URLs for context and grounding. Example: "https://example.com/path.html". A maximum of 20 URLs are allowed. Corresponds to the JSON property contextUrls

Returns:

  • (Array<String>)


3681
3682
3683
# File 'lib/google/apis/ces_v1/classes.rb', line 3681

def context_urls
  @context_urls
end

#descriptionString

Optional. Description of the tool's purpose. Corresponds to the JSON property description

Returns:

  • (String)


3686
3687
3688
# File 'lib/google/apis/ces_v1/classes.rb', line 3686

def description
  @description
end

#exclude_domainsArray<String>

Optional. List of domains to be excluded from the search results. Example: " example.com". A maximum of 2000 domains can be excluded. Corresponds to the JSON property excludeDomains

Returns:

  • (Array<String>)


3692
3693
3694
# File 'lib/google/apis/ces_v1/classes.rb', line 3692

def exclude_domains
  @exclude_domains
end

#nameString

Required. The name of the tool. Corresponds to the JSON property name

Returns:

  • (String)


3697
3698
3699
# File 'lib/google/apis/ces_v1/classes.rb', line 3697

def name
  @name
end

#preferred_domainsArray<String>

Optional. Specifies domains to restrict search results to. Example: "example. com", "another.site". A maximum of 20 domains can be specified. Corresponds to the JSON property preferredDomains

Returns:

  • (Array<String>)


3703
3704
3705
# File 'lib/google/apis/ces_v1/classes.rb', line 3703

def preferred_domains
  @preferred_domains
end

#prompt_configGoogle::Apis::CesV1::GoogleSearchToolPromptConfig

Prompt settings used by the model when processing or summarizing the google search results. Corresponds to the JSON property promptConfig



3709
3710
3711
# File 'lib/google/apis/ces_v1/classes.rb', line 3709

def prompt_config
  @prompt_config
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3716
3717
3718
3719
3720
3721
3722
3723
# File 'lib/google/apis/ces_v1/classes.rb', line 3716

def update!(**args)
  @context_urls = args[:context_urls] if args.key?(:context_urls)
  @description = args[:description] if args.key?(:description)
  @exclude_domains = args[:exclude_domains] if args.key?(:exclude_domains)
  @name = args[:name] if args.key?(:name)
  @preferred_domains = args[:preferred_domains] if args.key?(:preferred_domains)
  @prompt_config = args[:prompt_config] if args.key?(:prompt_config)
end