public sealed class GenerateGroundedContentRequest.Types.GenerationSpec : IMessage<GenerateGroundedContentRequest.Types.GenerationSpec>, IEquatable<GenerateGroundedContentRequest.Types.GenerationSpec>, IDeepCloneable<GenerateGroundedContentRequest.Types.GenerationSpec>, IBufferMessage, IMessage
Reference documentation and code samples for the Discovery Engine v1 API class GenerateGroundedContentRequest.Types.GenerationSpec.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis document provides reference information for the \u003ccode\u003eGenerateGroundedContentRequest.Types.GenerationSpec\u003c/code\u003e class within the Google Cloud Discovery Engine v1 API, detailing its properties, constructors, and implementations.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGenerationSpec\u003c/code\u003e class is designed to specify content generation parameters, including properties like \u003ccode\u003eFrequencyPenalty\u003c/code\u003e, \u003ccode\u003eMaxOutputTokens\u003c/code\u003e, \u003ccode\u003ePresencePenalty\u003c/code\u003e, \u003ccode\u003eTemperature\u003c/code\u003e, \u003ccode\u003eTopK\u003c/code\u003e, and \u003ccode\u003eTopP\u003c/code\u003e for customizing the generation process.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGenerateGroundedContentRequest.Types.GenerationSpec\u003c/code\u003e class implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, highlighting its role in message handling and object management.\u003c/p\u003e\n"],["\u003cp\u003eThe document provides access to seven versions of the \u003ccode\u003eGenerateGroundedContentRequest.Types.GenerationSpec\u003c/code\u003e class ranging from version 1.0.0-beta06 to the latest 1.6.0, each accessible through individual links.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGenerationSpec\u003c/code\u003e class includes properties to manage the language code, such as \u003ccode\u003eLanguageCode\u003c/code\u003e, and a \u003ccode\u003eModelId\u003c/code\u003e property to define the Vertex model used for generating content.\u003c/p\u003e\n"]]],[],null,["# Discovery Engine v1 API - Class GenerateGroundedContentRequest.Types.GenerationSpec (1.9.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.9.0 (latest)](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest.Types.GenerationSpec)\n- [1.8.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.8.0/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest.Types.GenerationSpec)\n- [1.7.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.7.0/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest.Types.GenerationSpec)\n- [1.6.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.6.0/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest.Types.GenerationSpec)\n- [1.5.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.5.0/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest.Types.GenerationSpec)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.4.0/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest.Types.GenerationSpec)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.3.0/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest.Types.GenerationSpec)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.2.0/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest.Types.GenerationSpec)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.1.0/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest.Types.GenerationSpec)\n- [1.0.0-beta06](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.0.0-beta06/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest.Types.GenerationSpec) \n\n public sealed class GenerateGroundedContentRequest.Types.GenerationSpec : IMessage\u003cGenerateGroundedContentRequest.Types.GenerationSpec\u003e, IEquatable\u003cGenerateGroundedContentRequest.Types.GenerationSpec\u003e, IDeepCloneable\u003cGenerateGroundedContentRequest.Types.GenerationSpec\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Discovery Engine v1 API class GenerateGroundedContentRequest.Types.GenerationSpec.\n\nContent generation specification. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e GenerateGroundedContentRequest.Types.GenerationSpec \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[GenerateGroundedContentRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest.Types)[GenerationSpec](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest.Types.GenerationSpec), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[GenerateGroundedContentRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest.Types)[GenerationSpec](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest.Types.GenerationSpec), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[GenerateGroundedContentRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest.Types)[GenerationSpec](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest.Types.GenerationSpec), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.DiscoveryEngine.V1](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.DiscoveryEngine.V1.dll\n\nConstructors\n------------\n\n### GenerationSpec()\n\n public GenerationSpec()\n\n### GenerationSpec(GenerationSpec)\n\n public GenerationSpec(GenerateGroundedContentRequest.Types.GenerationSpec other)\n\nProperties\n----------\n\n### FrequencyPenalty\n\n public float FrequencyPenalty { get; set; }\n\nIf specified, custom value for frequency penalty will be used.\n\n### HasFrequencyPenalty\n\n public bool HasFrequencyPenalty { get; }\n\nGets whether the \"frequency_penalty\" field is set\n\n### HasMaxOutputTokens\n\n public bool HasMaxOutputTokens { get; }\n\nGets whether the \"max_output_tokens\" field is set\n\n### HasPresencePenalty\n\n public bool HasPresencePenalty { get; }\n\nGets whether the \"presence_penalty\" field is set\n\n### HasSeed\n\n public bool HasSeed { get; }\n\nGets whether the \"seed\" field is set\n\n### HasTemperature\n\n public bool HasTemperature { get; }\n\nGets whether the \"temperature\" field is set\n\n### HasTopK\n\n public bool HasTopK { get; }\n\nGets whether the \"top_k\" field is set\n\n### HasTopP\n\n public bool HasTopP { get; }\n\nGets whether the \"top_p\" field is set\n\n### LanguageCode\n\n public string LanguageCode { get; set; }\n\nLanguage code for content. Use language tags defined by\n[BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).\n\n### MaxOutputTokens\n\n public int MaxOutputTokens { get; set; }\n\nIf specified, custom value for max output tokens will be used.\n\n### ModelId\n\n public string ModelId { get; set; }\n\nSpecifies which Vertex model id to use for generation.\n\n### PresencePenalty\n\n public float PresencePenalty { get; set; }\n\nIf specified, custom value for presence penalty will be used.\n\n### Seed\n\n public int Seed { get; set; }\n\nIf specified, custom value for the seed will be used.\n\n### Temperature\n\n public float Temperature { get; set; }\n\nIf specified, custom value for the temperature will be used.\n\n### TopK\n\n public int TopK { get; set; }\n\nIf specified, custom value for top-k sampling will be used.\n\n### TopP\n\n public float TopP { get; set; }\n\nIf specified, custom value for nucleus sampling will be used."]]