Class: Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest
- Inherits:
-
Object
- Object
- Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb
Overview
Top-level message sent by the client for the GenerateGroundedContent
method.
Defined Under Namespace
Classes: DynamicRetrievalConfiguration, GenerationSpec, GroundingSource, GroundingSpec, UserLabelsEntry
Instance Attribute Summary collapse
-
#contents ⇒ ::Array<::Google::Cloud::DiscoveryEngine::V1::GroundedGenerationContent>
Content of the current conversation with the model.
-
#generation_spec ⇒ ::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GenerationSpec
Content generation specification.
-
#grounding_spec ⇒ ::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSpec
Grounding specification.
-
#location ⇒ ::String
Required.
-
#system_instruction ⇒ ::Google::Cloud::DiscoveryEngine::V1::GroundedGenerationContent
Content of the system instruction for the current API.
-
#user_labels ⇒ ::Google::Protobuf::Map{::String => ::String}
The user labels applied to a resource must meet the following requirements:.
Instance Attribute Details
#contents ⇒ ::Array<::Google::Cloud::DiscoveryEngine::V1::GroundedGenerationContent>
Returns Content of the current conversation with the model.
For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request.
Only a single-turn query is supported currently.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb', line 95 class GenerateGroundedContentRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Content generation specification. # @!attribute [rw] model_id # @return [::String] # Specifies which Vertex model id to use for generation. # @!attribute [rw] language_code # @return [::String] # Language code for content. Use language tags defined by # [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). # @!attribute [rw] temperature # @return [::Float] # If specified, custom value for the temperature will be used. # @!attribute [rw] top_p # @return [::Float] # If specified, custom value for nucleus sampling will be used. # @!attribute [rw] top_k # @return [::Integer] # If specified, custom value for top-k sampling will be used. # @!attribute [rw] frequency_penalty # @return [::Float] # If specified, custom value for frequency penalty will be used. # @!attribute [rw] presence_penalty # @return [::Float] # If specified, custom value for presence penalty will be used. # @!attribute [rw] max_output_tokens # @return [::Integer] # If specified, custom value for max output tokens will be used. class GenerationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Describes the options to customize dynamic retrieval. # @!attribute [rw] predictor # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::DynamicRetrievalConfiguration::DynamicRetrievalPredictor] # Specification for the predictor for dynamic retrieval. class DynamicRetrievalConfiguration include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Describes the predictor settings for dynamic retrieval. # @!attribute [rw] version # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::DynamicRetrievalConfiguration::DynamicRetrievalPredictor::Version] # The version of the predictor to be used in dynamic retrieval. # @!attribute [rw] threshold # @return [::Float] # The value of the threshold. If the predictor will predict a # value smaller than this, it would suppress grounding in the source. class DynamicRetrievalPredictor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The version of the predictor to be used in dynamic retrieval. module Version # Automatically choose the best version of the retrieval predictor. VERSION_UNSPECIFIED = 0 # The V1 model which is evaluating each source independently. V1_INDEPENDENT = 1 end end end # Grounding source. # @!attribute [rw] inline_source # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource::InlineSource] # If set, grounding is performed with inline content. # @!attribute [rw] search_source # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource::SearchSource] # If set, grounding is performed with Vertex AI Search. # @!attribute [rw] google_search_source # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource::GoogleSearchSource] # If set, grounding is performed with Google Search. class GroundingSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Message to be used for grounding based on inline content. # @!attribute [rw] grounding_facts # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GroundingFact>] # List of facts to be used for grounding. # @!attribute [rw] attributes # @return [::Google::Protobuf::Map{::String => ::String}] # Attributes associated with the content. # # Common attributes include `source` (indicating where the content was # sourced from) and `author` (indicating the author of the content). class InlineSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class AttributesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Message to be used for grounding with Vertex AI Search. # @!attribute [rw] serving_config # @return [::String] # The resource name of the Engine to use. # # Format: # `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}` # @!attribute [rw] max_result_count # @return [::Integer] # Number of search results to return. # # The default value is 10. The maximumm allowed value is 10. # @!attribute [rw] filter # @return [::String] # Filter expression to be applied to the search. # # The syntax is the same as # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#filter SearchRequest.filter}. # @!attribute [rw] safe_search # @return [::Boolean] # If set, safe search is enabled in Vertex AI Search requests. class SearchSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Google Search config parameters. # @!attribute [rw] dynamic_retrieval_config # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::DynamicRetrievalConfiguration] # Optional. Specifies the dynamic retrieval configuration for the given # source. class GoogleSearchSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Grounding specification. # @!attribute [rw] grounding_sources # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource>] # Grounding sources. class GroundingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class UserLabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#generation_spec ⇒ ::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GenerationSpec
Returns Content generation specification.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb', line 95 class GenerateGroundedContentRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Content generation specification. # @!attribute [rw] model_id # @return [::String] # Specifies which Vertex model id to use for generation. # @!attribute [rw] language_code # @return [::String] # Language code for content. Use language tags defined by # [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). # @!attribute [rw] temperature # @return [::Float] # If specified, custom value for the temperature will be used. # @!attribute [rw] top_p # @return [::Float] # If specified, custom value for nucleus sampling will be used. # @!attribute [rw] top_k # @return [::Integer] # If specified, custom value for top-k sampling will be used. # @!attribute [rw] frequency_penalty # @return [::Float] # If specified, custom value for frequency penalty will be used. # @!attribute [rw] presence_penalty # @return [::Float] # If specified, custom value for presence penalty will be used. # @!attribute [rw] max_output_tokens # @return [::Integer] # If specified, custom value for max output tokens will be used. class GenerationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Describes the options to customize dynamic retrieval. # @!attribute [rw] predictor # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::DynamicRetrievalConfiguration::DynamicRetrievalPredictor] # Specification for the predictor for dynamic retrieval. class DynamicRetrievalConfiguration include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Describes the predictor settings for dynamic retrieval. # @!attribute [rw] version # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::DynamicRetrievalConfiguration::DynamicRetrievalPredictor::Version] # The version of the predictor to be used in dynamic retrieval. # @!attribute [rw] threshold # @return [::Float] # The value of the threshold. If the predictor will predict a # value smaller than this, it would suppress grounding in the source. class DynamicRetrievalPredictor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The version of the predictor to be used in dynamic retrieval. module Version # Automatically choose the best version of the retrieval predictor. VERSION_UNSPECIFIED = 0 # The V1 model which is evaluating each source independently. V1_INDEPENDENT = 1 end end end # Grounding source. # @!attribute [rw] inline_source # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource::InlineSource] # If set, grounding is performed with inline content. # @!attribute [rw] search_source # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource::SearchSource] # If set, grounding is performed with Vertex AI Search. # @!attribute [rw] google_search_source # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource::GoogleSearchSource] # If set, grounding is performed with Google Search. class GroundingSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Message to be used for grounding based on inline content. # @!attribute [rw] grounding_facts # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GroundingFact>] # List of facts to be used for grounding. # @!attribute [rw] attributes # @return [::Google::Protobuf::Map{::String => ::String}] # Attributes associated with the content. # # Common attributes include `source` (indicating where the content was # sourced from) and `author` (indicating the author of the content). class InlineSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class AttributesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Message to be used for grounding with Vertex AI Search. # @!attribute [rw] serving_config # @return [::String] # The resource name of the Engine to use. # # Format: # `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}` # @!attribute [rw] max_result_count # @return [::Integer] # Number of search results to return. # # The default value is 10. The maximumm allowed value is 10. # @!attribute [rw] filter # @return [::String] # Filter expression to be applied to the search. # # The syntax is the same as # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#filter SearchRequest.filter}. # @!attribute [rw] safe_search # @return [::Boolean] # If set, safe search is enabled in Vertex AI Search requests. class SearchSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Google Search config parameters. # @!attribute [rw] dynamic_retrieval_config # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::DynamicRetrievalConfiguration] # Optional. Specifies the dynamic retrieval configuration for the given # source. class GoogleSearchSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Grounding specification. # @!attribute [rw] grounding_sources # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource>] # Grounding sources. class GroundingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class UserLabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#grounding_spec ⇒ ::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSpec
Returns Grounding specification.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb', line 95 class GenerateGroundedContentRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Content generation specification. # @!attribute [rw] model_id # @return [::String] # Specifies which Vertex model id to use for generation. # @!attribute [rw] language_code # @return [::String] # Language code for content. Use language tags defined by # [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). # @!attribute [rw] temperature # @return [::Float] # If specified, custom value for the temperature will be used. # @!attribute [rw] top_p # @return [::Float] # If specified, custom value for nucleus sampling will be used. # @!attribute [rw] top_k # @return [::Integer] # If specified, custom value for top-k sampling will be used. # @!attribute [rw] frequency_penalty # @return [::Float] # If specified, custom value for frequency penalty will be used. # @!attribute [rw] presence_penalty # @return [::Float] # If specified, custom value for presence penalty will be used. # @!attribute [rw] max_output_tokens # @return [::Integer] # If specified, custom value for max output tokens will be used. class GenerationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Describes the options to customize dynamic retrieval. # @!attribute [rw] predictor # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::DynamicRetrievalConfiguration::DynamicRetrievalPredictor] # Specification for the predictor for dynamic retrieval. class DynamicRetrievalConfiguration include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Describes the predictor settings for dynamic retrieval. # @!attribute [rw] version # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::DynamicRetrievalConfiguration::DynamicRetrievalPredictor::Version] # The version of the predictor to be used in dynamic retrieval. # @!attribute [rw] threshold # @return [::Float] # The value of the threshold. If the predictor will predict a # value smaller than this, it would suppress grounding in the source. class DynamicRetrievalPredictor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The version of the predictor to be used in dynamic retrieval. module Version # Automatically choose the best version of the retrieval predictor. VERSION_UNSPECIFIED = 0 # The V1 model which is evaluating each source independently. V1_INDEPENDENT = 1 end end end # Grounding source. # @!attribute [rw] inline_source # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource::InlineSource] # If set, grounding is performed with inline content. # @!attribute [rw] search_source # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource::SearchSource] # If set, grounding is performed with Vertex AI Search. # @!attribute [rw] google_search_source # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource::GoogleSearchSource] # If set, grounding is performed with Google Search. class GroundingSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Message to be used for grounding based on inline content. # @!attribute [rw] grounding_facts # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GroundingFact>] # List of facts to be used for grounding. # @!attribute [rw] attributes # @return [::Google::Protobuf::Map{::String => ::String}] # Attributes associated with the content. # # Common attributes include `source` (indicating where the content was # sourced from) and `author` (indicating the author of the content). class InlineSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class AttributesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Message to be used for grounding with Vertex AI Search. # @!attribute [rw] serving_config # @return [::String] # The resource name of the Engine to use. # # Format: # `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}` # @!attribute [rw] max_result_count # @return [::Integer] # Number of search results to return. # # The default value is 10. The maximumm allowed value is 10. # @!attribute [rw] filter # @return [::String] # Filter expression to be applied to the search. # # The syntax is the same as # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#filter SearchRequest.filter}. # @!attribute [rw] safe_search # @return [::Boolean] # If set, safe search is enabled in Vertex AI Search requests. class SearchSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Google Search config parameters. # @!attribute [rw] dynamic_retrieval_config # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::DynamicRetrievalConfiguration] # Optional. Specifies the dynamic retrieval configuration for the given # source. class GoogleSearchSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Grounding specification. # @!attribute [rw] grounding_sources # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource>] # Grounding sources. class GroundingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class UserLabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#location ⇒ ::String
Returns Required. Location resource.
Format: projects/{project}/locations/{location}
.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb', line 95 class GenerateGroundedContentRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Content generation specification. # @!attribute [rw] model_id # @return [::String] # Specifies which Vertex model id to use for generation. # @!attribute [rw] language_code # @return [::String] # Language code for content. Use language tags defined by # [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). # @!attribute [rw] temperature # @return [::Float] # If specified, custom value for the temperature will be used. # @!attribute [rw] top_p # @return [::Float] # If specified, custom value for nucleus sampling will be used. # @!attribute [rw] top_k # @return [::Integer] # If specified, custom value for top-k sampling will be used. # @!attribute [rw] frequency_penalty # @return [::Float] # If specified, custom value for frequency penalty will be used. # @!attribute [rw] presence_penalty # @return [::Float] # If specified, custom value for presence penalty will be used. # @!attribute [rw] max_output_tokens # @return [::Integer] # If specified, custom value for max output tokens will be used. class GenerationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Describes the options to customize dynamic retrieval. # @!attribute [rw] predictor # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::DynamicRetrievalConfiguration::DynamicRetrievalPredictor] # Specification for the predictor for dynamic retrieval. class DynamicRetrievalConfiguration include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Describes the predictor settings for dynamic retrieval. # @!attribute [rw] version # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::DynamicRetrievalConfiguration::DynamicRetrievalPredictor::Version] # The version of the predictor to be used in dynamic retrieval. # @!attribute [rw] threshold # @return [::Float] # The value of the threshold. If the predictor will predict a # value smaller than this, it would suppress grounding in the source. class DynamicRetrievalPredictor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The version of the predictor to be used in dynamic retrieval. module Version # Automatically choose the best version of the retrieval predictor. VERSION_UNSPECIFIED = 0 # The V1 model which is evaluating each source independently. V1_INDEPENDENT = 1 end end end # Grounding source. # @!attribute [rw] inline_source # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource::InlineSource] # If set, grounding is performed with inline content. # @!attribute [rw] search_source # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource::SearchSource] # If set, grounding is performed with Vertex AI Search. # @!attribute [rw] google_search_source # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource::GoogleSearchSource] # If set, grounding is performed with Google Search. class GroundingSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Message to be used for grounding based on inline content. # @!attribute [rw] grounding_facts # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GroundingFact>] # List of facts to be used for grounding. # @!attribute [rw] attributes # @return [::Google::Protobuf::Map{::String => ::String}] # Attributes associated with the content. # # Common attributes include `source` (indicating where the content was # sourced from) and `author` (indicating the author of the content). class InlineSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class AttributesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Message to be used for grounding with Vertex AI Search. # @!attribute [rw] serving_config # @return [::String] # The resource name of the Engine to use. # # Format: # `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}` # @!attribute [rw] max_result_count # @return [::Integer] # Number of search results to return. # # The default value is 10. The maximumm allowed value is 10. # @!attribute [rw] filter # @return [::String] # Filter expression to be applied to the search. # # The syntax is the same as # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#filter SearchRequest.filter}. # @!attribute [rw] safe_search # @return [::Boolean] # If set, safe search is enabled in Vertex AI Search requests. class SearchSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Google Search config parameters. # @!attribute [rw] dynamic_retrieval_config # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::DynamicRetrievalConfiguration] # Optional. Specifies the dynamic retrieval configuration for the given # source. class GoogleSearchSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Grounding specification. # @!attribute [rw] grounding_sources # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource>] # Grounding sources. class GroundingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class UserLabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#system_instruction ⇒ ::Google::Cloud::DiscoveryEngine::V1::GroundedGenerationContent
Returns Content of the system instruction for the current API.
These instructions will take priority over any other prompt instructions if the selected model is supporting them.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb', line 95 class GenerateGroundedContentRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Content generation specification. # @!attribute [rw] model_id # @return [::String] # Specifies which Vertex model id to use for generation. # @!attribute [rw] language_code # @return [::String] # Language code for content. Use language tags defined by # [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). # @!attribute [rw] temperature # @return [::Float] # If specified, custom value for the temperature will be used. # @!attribute [rw] top_p # @return [::Float] # If specified, custom value for nucleus sampling will be used. # @!attribute [rw] top_k # @return [::Integer] # If specified, custom value for top-k sampling will be used. # @!attribute [rw] frequency_penalty # @return [::Float] # If specified, custom value for frequency penalty will be used. # @!attribute [rw] presence_penalty # @return [::Float] # If specified, custom value for presence penalty will be used. # @!attribute [rw] max_output_tokens # @return [::Integer] # If specified, custom value for max output tokens will be used. class GenerationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Describes the options to customize dynamic retrieval. # @!attribute [rw] predictor # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::DynamicRetrievalConfiguration::DynamicRetrievalPredictor] # Specification for the predictor for dynamic retrieval. class DynamicRetrievalConfiguration include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Describes the predictor settings for dynamic retrieval. # @!attribute [rw] version # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::DynamicRetrievalConfiguration::DynamicRetrievalPredictor::Version] # The version of the predictor to be used in dynamic retrieval. # @!attribute [rw] threshold # @return [::Float] # The value of the threshold. If the predictor will predict a # value smaller than this, it would suppress grounding in the source. class DynamicRetrievalPredictor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The version of the predictor to be used in dynamic retrieval. module Version # Automatically choose the best version of the retrieval predictor. VERSION_UNSPECIFIED = 0 # The V1 model which is evaluating each source independently. V1_INDEPENDENT = 1 end end end # Grounding source. # @!attribute [rw] inline_source # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource::InlineSource] # If set, grounding is performed with inline content. # @!attribute [rw] search_source # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource::SearchSource] # If set, grounding is performed with Vertex AI Search. # @!attribute [rw] google_search_source # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource::GoogleSearchSource] # If set, grounding is performed with Google Search. class GroundingSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Message to be used for grounding based on inline content. # @!attribute [rw] grounding_facts # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GroundingFact>] # List of facts to be used for grounding. # @!attribute [rw] attributes # @return [::Google::Protobuf::Map{::String => ::String}] # Attributes associated with the content. # # Common attributes include `source` (indicating where the content was # sourced from) and `author` (indicating the author of the content). class InlineSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class AttributesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Message to be used for grounding with Vertex AI Search. # @!attribute [rw] serving_config # @return [::String] # The resource name of the Engine to use. # # Format: # `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}` # @!attribute [rw] max_result_count # @return [::Integer] # Number of search results to return. # # The default value is 10. The maximumm allowed value is 10. # @!attribute [rw] filter # @return [::String] # Filter expression to be applied to the search. # # The syntax is the same as # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#filter SearchRequest.filter}. # @!attribute [rw] safe_search # @return [::Boolean] # If set, safe search is enabled in Vertex AI Search requests. class SearchSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Google Search config parameters. # @!attribute [rw] dynamic_retrieval_config # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::DynamicRetrievalConfiguration] # Optional. Specifies the dynamic retrieval configuration for the given # source. class GoogleSearchSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Grounding specification. # @!attribute [rw] grounding_sources # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource>] # Grounding sources. class GroundingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class UserLabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#user_labels ⇒ ::Google::Protobuf::Map{::String => ::String}
Returns The user labels applied to a resource must meet the following requirements:
- Each resource can have multiple labels, up to a maximum of 64.
- Each label must be a key-value pair.
- Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters.
- Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.
- The key portion of a label must be unique. However, you can use the same key with multiple resources.
- Keys must start with a lowercase letter or international character.
See Google Cloud Document for more details.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb', line 95 class GenerateGroundedContentRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Content generation specification. # @!attribute [rw] model_id # @return [::String] # Specifies which Vertex model id to use for generation. # @!attribute [rw] language_code # @return [::String] # Language code for content. Use language tags defined by # [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). # @!attribute [rw] temperature # @return [::Float] # If specified, custom value for the temperature will be used. # @!attribute [rw] top_p # @return [::Float] # If specified, custom value for nucleus sampling will be used. # @!attribute [rw] top_k # @return [::Integer] # If specified, custom value for top-k sampling will be used. # @!attribute [rw] frequency_penalty # @return [::Float] # If specified, custom value for frequency penalty will be used. # @!attribute [rw] presence_penalty # @return [::Float] # If specified, custom value for presence penalty will be used. # @!attribute [rw] max_output_tokens # @return [::Integer] # If specified, custom value for max output tokens will be used. class GenerationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Describes the options to customize dynamic retrieval. # @!attribute [rw] predictor # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::DynamicRetrievalConfiguration::DynamicRetrievalPredictor] # Specification for the predictor for dynamic retrieval. class DynamicRetrievalConfiguration include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Describes the predictor settings for dynamic retrieval. # @!attribute [rw] version # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::DynamicRetrievalConfiguration::DynamicRetrievalPredictor::Version] # The version of the predictor to be used in dynamic retrieval. # @!attribute [rw] threshold # @return [::Float] # The value of the threshold. If the predictor will predict a # value smaller than this, it would suppress grounding in the source. class DynamicRetrievalPredictor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The version of the predictor to be used in dynamic retrieval. module Version # Automatically choose the best version of the retrieval predictor. VERSION_UNSPECIFIED = 0 # The V1 model which is evaluating each source independently. V1_INDEPENDENT = 1 end end end # Grounding source. # @!attribute [rw] inline_source # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource::InlineSource] # If set, grounding is performed with inline content. # @!attribute [rw] search_source # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource::SearchSource] # If set, grounding is performed with Vertex AI Search. # @!attribute [rw] google_search_source # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource::GoogleSearchSource] # If set, grounding is performed with Google Search. class GroundingSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Message to be used for grounding based on inline content. # @!attribute [rw] grounding_facts # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GroundingFact>] # List of facts to be used for grounding. # @!attribute [rw] attributes # @return [::Google::Protobuf::Map{::String => ::String}] # Attributes associated with the content. # # Common attributes include `source` (indicating where the content was # sourced from) and `author` (indicating the author of the content). class InlineSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class AttributesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Message to be used for grounding with Vertex AI Search. # @!attribute [rw] serving_config # @return [::String] # The resource name of the Engine to use. # # Format: # `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}` # @!attribute [rw] max_result_count # @return [::Integer] # Number of search results to return. # # The default value is 10. The maximumm allowed value is 10. # @!attribute [rw] filter # @return [::String] # Filter expression to be applied to the search. # # The syntax is the same as # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#filter SearchRequest.filter}. # @!attribute [rw] safe_search # @return [::Boolean] # If set, safe search is enabled in Vertex AI Search requests. class SearchSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Google Search config parameters. # @!attribute [rw] dynamic_retrieval_config # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::DynamicRetrievalConfiguration] # Optional. Specifies the dynamic retrieval configuration for the given # source. class GoogleSearchSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Grounding specification. # @!attribute [rw] grounding_sources # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource>] # Grounding sources. class GroundingSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class UserLabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |