Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GroundingChunk

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

A piece of evidence that supports a claim made by the model. This is used to show a citation for a claim made by the model. When grounding is enabled, the model returns a GroundingChunk that contains a reference to the source of the information.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1GroundingChunk

Returns a new instance of GoogleCloudAiplatformV1GroundingChunk.



17975
17976
17977
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 17975

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

Instance Attribute Details

#imageGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1GroundingChunkImage

An Image chunk is a piece of evidence that comes from an image search result. It contains the URI of the image search result and the URI of the image. This is used to provide the user with a link to the source of the information. Corresponds to the JSON property image



17952
17953
17954
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 17952

def image
  @image
end

#mapsGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1GroundingChunkMaps

A Maps chunk is a piece of evidence that comes from Google Maps, containing information about places or routes. This is used to provide the user with rich, location-based information. Corresponds to the JSON property maps



17959
17960
17961
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 17959

def maps
  @maps
end

#retrieved_contextGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1GroundingChunkRetrievedContext

Context retrieved from a data source to ground the model's response. This is used when a retrieval tool fetches information from a user-provided corpus or a public dataset. Corresponds to the JSON property retrievedContext



17966
17967
17968
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 17966

def retrieved_context
  @retrieved_context
end

#webGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1GroundingChunkWeb

A Web chunk is a piece of evidence that comes from a web page. It contains the URI of the web page, the title of the page, and the domain of the page. This is used to provide the user with a link to the source of the information. Corresponds to the JSON property web



17973
17974
17975
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 17973

def web
  @web
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



17980
17981
17982
17983
17984
17985
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 17980

def update!(**args)
  @image = args[:image] if args.key?(:image)
  @maps = args[:maps] if args.key?(:maps)
  @retrieved_context = args[:retrieved_context] if args.key?(:retrieved_context)
  @web = args[:web] if args.key?(:web)
end