Class: Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext

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

Overview

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext

Returns a new instance of GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext.



2114
2115
2116
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 2114

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

Instance Attribute Details

#document_nameString

Output only. The full resource name of the referenced Vertex AI Search document. This is used to identify the specific document that was retrieved. The format is projects/project/locations/location/collections/collection /dataStores/data_store/branches/branch/documents/document`. Corresponds to the JSON propertydocumentName`

Returns:

  • (String)


2091
2092
2093
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 2091

def document_name
  @document_name
end

#rag_chunkGoogle::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1RagChunk

A RagChunk includes the content of a chunk of a RagFile, and associated metadata. Corresponds to the JSON property ragChunk



2097
2098
2099
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 2097

def rag_chunk
  @rag_chunk
end

#textString

The content of the retrieved data source. Corresponds to the JSON property text

Returns:

  • (String)


2102
2103
2104
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 2102

def text
  @text
end

#titleString

The title of the retrieved data source. Corresponds to the JSON property title

Returns:

  • (String)


2107
2108
2109
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 2107

def title
  @title
end

#uriString

The URI of the retrieved data source. Corresponds to the JSON property uri

Returns:

  • (String)


2112
2113
2114
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 2112

def uri
  @uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2119
2120
2121
2122
2123
2124
2125
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 2119

def update!(**args)
  @document_name = args[:document_name] if args.key?(:document_name)
  @rag_chunk = args[:rag_chunk] if args.key?(:rag_chunk)
  @text = args[:text] if args.key?(:text)
  @title = args[:title] if args.key?(:title)
  @uri = args[:uri] if args.key?(:uri)
end