Reference documentation and code samples for the Discovery Engine V1BETA API class Google::Cloud::DiscoveryEngine::V1beta::GenerateGroundedContentRequest::GenerationSpec.
Content generation specification.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#frequency_penalty
deffrequency_penalty()->::Float
Returns
(::Float) — If specified, custom value for frequency penalty will be used.
#frequency_penalty=
deffrequency_penalty=(value)->::Float
Parameter
value (::Float) — If specified, custom value for frequency penalty will be used.
Returns
(::Float) — If specified, custom value for frequency penalty will be used.
#language_code
deflanguage_code()->::String
Returns
(::String) — Language code for content. Use language tags defined by
BCP47.
#language_code=
deflanguage_code=(value)->::String
Parameter
value (::String) — Language code for content. Use language tags defined by
BCP47.
Returns
(::String) — Language code for content. Use language tags defined by
BCP47.
#max_output_tokens
defmax_output_tokens()->::Integer
Returns
(::Integer) — If specified, custom value for max output tokens will be used.
#max_output_tokens=
defmax_output_tokens=(value)->::Integer
Parameter
value (::Integer) — If specified, custom value for max output tokens will be used.
Returns
(::Integer) — If specified, custom value for max output tokens will be used.
#model_id
defmodel_id()->::String
Returns
(::String) — Specifies which Vertex model id to use for generation.
#model_id=
defmodel_id=(value)->::String
Parameter
value (::String) — Specifies which Vertex model id to use for generation.
Returns
(::String) — Specifies which Vertex model id to use for generation.
#presence_penalty
defpresence_penalty()->::Float
Returns
(::Float) — If specified, custom value for presence penalty will be used.
#presence_penalty=
defpresence_penalty=(value)->::Float
Parameter
value (::Float) — If specified, custom value for presence penalty will be used.
Returns
(::Float) — If specified, custom value for presence penalty will be used.
#temperature
deftemperature()->::Float
Returns
(::Float) — If specified, custom value for the temperature will be used.
#temperature=
deftemperature=(value)->::Float
Parameter
value (::Float) — If specified, custom value for the temperature will be used.
Returns
(::Float) — If specified, custom value for the temperature will be used.
#top_k
deftop_k()->::Integer
Returns
(::Integer) — If specified, custom value for top-k sampling will be used.
#top_k=
deftop_k=(value)->::Integer
Parameter
value (::Integer) — If specified, custom value for top-k sampling will be used.
Returns
(::Integer) — If specified, custom value for top-k sampling will be used.
#top_p
deftop_p()->::Float
Returns
(::Float) — If specified, custom value for nucleus sampling will be used.
#top_p=
deftop_p=(value)->::Float
Parameter
value (::Float) — If specified, custom value for nucleus sampling will be used.
Returns
(::Float) — If specified, custom value for nucleus sampling will be used.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Discovery Engine V1BETA API - Class Google::Cloud::DiscoveryEngine::V1beta::GenerateGroundedContentRequest::GenerationSpec (v0.21.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.21.0 (latest)](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-GenerateGroundedContentRequest-GenerationSpec)\n- [0.20.1](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.20.1/Google-Cloud-DiscoveryEngine-V1beta-GenerateGroundedContentRequest-GenerationSpec)\n- [0.19.1](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.19.1/Google-Cloud-DiscoveryEngine-V1beta-GenerateGroundedContentRequest-GenerationSpec)\n- [0.18.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.18.0/Google-Cloud-DiscoveryEngine-V1beta-GenerateGroundedContentRequest-GenerationSpec)\n- [0.17.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.17.0/Google-Cloud-DiscoveryEngine-V1beta-GenerateGroundedContentRequest-GenerationSpec)\n- [0.16.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.16.0/Google-Cloud-DiscoveryEngine-V1beta-GenerateGroundedContentRequest-GenerationSpec)\n- [0.15.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.15.0/Google-Cloud-DiscoveryEngine-V1beta-GenerateGroundedContentRequest-GenerationSpec)\n- [0.14.2](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.14.2/Google-Cloud-DiscoveryEngine-V1beta-GenerateGroundedContentRequest-GenerationSpec)\n- [0.13.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.13.0/Google-Cloud-DiscoveryEngine-V1beta-GenerateGroundedContentRequest-GenerationSpec)\n- [0.12.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.12.0/Google-Cloud-DiscoveryEngine-V1beta-GenerateGroundedContentRequest-GenerationSpec)\n- [0.11.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.11.0/Google-Cloud-DiscoveryEngine-V1beta-GenerateGroundedContentRequest-GenerationSpec)\n- [0.10.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.10.0/Google-Cloud-DiscoveryEngine-V1beta-GenerateGroundedContentRequest-GenerationSpec)\n- [0.9.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.9.0/Google-Cloud-DiscoveryEngine-V1beta-GenerateGroundedContentRequest-GenerationSpec)\n- [0.8.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.8.0/Google-Cloud-DiscoveryEngine-V1beta-GenerateGroundedContentRequest-GenerationSpec)\n- [0.7.2](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.7.2/Google-Cloud-DiscoveryEngine-V1beta-GenerateGroundedContentRequest-GenerationSpec)\n- [0.6.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.6.0/Google-Cloud-DiscoveryEngine-V1beta-GenerateGroundedContentRequest-GenerationSpec)\n- [0.5.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.5.0/Google-Cloud-DiscoveryEngine-V1beta-GenerateGroundedContentRequest-GenerationSpec)\n- [0.4.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.4.0/Google-Cloud-DiscoveryEngine-V1beta-GenerateGroundedContentRequest-GenerationSpec)\n- [0.3.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.3.0/Google-Cloud-DiscoveryEngine-V1beta-GenerateGroundedContentRequest-GenerationSpec)\n- [0.2.1](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.2.1/Google-Cloud-DiscoveryEngine-V1beta-GenerateGroundedContentRequest-GenerationSpec)\n- [0.1.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.1.0/Google-Cloud-DiscoveryEngine-V1beta-GenerateGroundedContentRequest-GenerationSpec) \nReference documentation and code samples for the Discovery Engine V1BETA API class Google::Cloud::DiscoveryEngine::V1beta::GenerateGroundedContentRequest::GenerationSpec.\n\nContent generation specification. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #frequency_penalty\n\n def frequency_penalty() -\u003e ::Float\n\n**Returns**\n\n- (::Float) --- If specified, custom value for frequency penalty will be used.\n\n### #frequency_penalty=\n\n def frequency_penalty=(value) -\u003e ::Float\n\n**Parameter**\n\n- **value** (::Float) --- If specified, custom value for frequency penalty will be used. \n**Returns**\n\n- (::Float) --- If specified, custom value for frequency penalty will be used.\n\n### #language_code\n\n def language_code() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Language code for content. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).\n\n### #language_code=\n\n def language_code=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Language code for content. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). \n**Returns**\n\n- (::String) --- Language code for content. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).\n\n### #max_output_tokens\n\n def max_output_tokens() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- If specified, custom value for max output tokens will be used.\n\n### #max_output_tokens=\n\n def max_output_tokens=(value) -\u003e ::Integer\n\n**Parameter**\n\n- **value** (::Integer) --- If specified, custom value for max output tokens will be used. \n**Returns**\n\n- (::Integer) --- If specified, custom value for max output tokens will be used.\n\n### #model_id\n\n def model_id() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Specifies which Vertex model id to use for generation.\n\n### #model_id=\n\n def model_id=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Specifies which Vertex model id to use for generation. \n**Returns**\n\n- (::String) --- Specifies which Vertex model id to use for generation.\n\n### #presence_penalty\n\n def presence_penalty() -\u003e ::Float\n\n**Returns**\n\n- (::Float) --- If specified, custom value for presence penalty will be used.\n\n### #presence_penalty=\n\n def presence_penalty=(value) -\u003e ::Float\n\n**Parameter**\n\n- **value** (::Float) --- If specified, custom value for presence penalty will be used. \n**Returns**\n\n- (::Float) --- If specified, custom value for presence penalty will be used.\n\n### #temperature\n\n def temperature() -\u003e ::Float\n\n**Returns**\n\n- (::Float) --- If specified, custom value for the temperature will be used.\n\n### #temperature=\n\n def temperature=(value) -\u003e ::Float\n\n**Parameter**\n\n- **value** (::Float) --- If specified, custom value for the temperature will be used. \n**Returns**\n\n- (::Float) --- If specified, custom value for the temperature will be used.\n\n### #top_k\n\n def top_k() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- If specified, custom value for top-k sampling will be used.\n\n### #top_k=\n\n def top_k=(value) -\u003e ::Integer\n\n**Parameter**\n\n- **value** (::Integer) --- If specified, custom value for top-k sampling will be used. \n**Returns**\n\n- (::Integer) --- If specified, custom value for top-k sampling will be used.\n\n### #top_p\n\n def top_p() -\u003e ::Float\n\n**Returns**\n\n- (::Float) --- If specified, custom value for nucleus sampling will be used.\n\n### #top_p=\n\n def top_p=(value) -\u003e ::Float\n\n**Parameter**\n\n- **value** (::Float) --- If specified, custom value for nucleus sampling will be used. \n**Returns**\n\n- (::Float) --- If specified, custom value for nucleus sampling will be used."]]