Show / Hide Table of Contents

Class GoogleCloudAiplatformV1GenerationConfig

Configuration for content generation. This message contains all the parameters that control how the model generates content. It allows you to influence the randomness, length, and structure of the output.

Inheritance
object
GoogleCloudAiplatformV1GenerationConfig
Implements
IDirectResponseSchema
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.Aiplatform.v1.Data
Assembly: Google.Apis.Aiplatform.v1.dll
Syntax
public class GoogleCloudAiplatformV1GenerationConfig : IDirectResponseSchema

Properties

AudioTimestamp

Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.

Declaration
[JsonProperty("audioTimestamp")]
public virtual bool? AudioTimestamp { get; set; }
Property Value
Type Description
bool?

CandidateCount

Optional. The number of candidate responses to generate. A higher candidate_count can provide more options to choose from, but it also consumes more resources. This can be useful for generating a variety of responses and selecting the best one.

Declaration
[JsonProperty("candidateCount")]
public virtual int? CandidateCount { get; set; }
Property Value
Type Description
int?

ETag

The ETag of the item.

Declaration
public virtual string ETag { get; set; }
Property Value
Type Description
string

EnableAffectiveDialog

Optional. If enabled, the model will detect emotions and adapt its responses accordingly. For example, if the model detects that the user is frustrated, it may provide a more empathetic response.

Declaration
[JsonProperty("enableAffectiveDialog")]
public virtual bool? EnableAffectiveDialog { get; set; }
Property Value
Type Description
bool?

FrequencyPenalty

Optional. Penalizes tokens based on their frequency in the generated text. A positive value helps to reduce the repetition of words and phrases. Valid values can range from [-2.0, 2.0].

Declaration
[JsonProperty("frequencyPenalty")]
public virtual float? FrequencyPenalty { get; set; }
Property Value
Type Description
float?

ImageConfig

Optional. Config for image generation features.

Declaration
[JsonProperty("imageConfig")]
public virtual GoogleCloudAiplatformV1ImageConfig ImageConfig { get; set; }
Property Value
Type Description
GoogleCloudAiplatformV1ImageConfig

Logprobs

Optional. The number of top log probabilities to return for each token. This can be used to see which other tokens were considered likely candidates for a given position. A higher value will return more options, but it will also increase the size of the response.

Declaration
[JsonProperty("logprobs")]
public virtual int? Logprobs { get; set; }
Property Value
Type Description
int?

MaxOutputTokens

Optional. The maximum number of tokens to generate in the response. A token is approximately four characters. The default value varies by model. This parameter can be used to control the length of the generated text and prevent overly long responses.

Declaration
[JsonProperty("maxOutputTokens")]
public virtual int? MaxOutputTokens { get; set; }
Property Value
Type Description
int?

MediaResolution

Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.

Declaration
[JsonProperty("mediaResolution")]
public virtual string MediaResolution { get; set; }
Property Value
Type Description
string

PresencePenalty

Optional. Penalizes tokens that have already appeared in the generated text. A positive value encourages the model to generate more diverse and less repetitive text. Valid values can range from [-2.0, 2.0].

Declaration
[JsonProperty("presencePenalty")]
public virtual float? PresencePenalty { get; set; }
Property Value
Type Description
float?

ResponseJsonSchema

Optional. When this field is set, response_schema must be omitted and response_mime_type must be set to application/json.

Declaration
[JsonProperty("responseJsonSchema")]
public virtual object ResponseJsonSchema { get; set; }
Property Value
Type Description
object

ResponseLogprobs

Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model's confidence in its own output and for debugging.

Declaration
[JsonProperty("responseLogprobs")]
public virtual bool? ResponseLogprobs { get; set; }
Property Value
Type Description
bool?

ResponseMimeType

Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include 'text/plain' (default) and 'application/json'. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.

Declaration
[JsonProperty("responseMimeType")]
public virtual string ResponseMimeType { get; set; }
Property Value
Type Description
string

ResponseModalities

Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to [TEXT, IMAGE], the response will include both text and an image.

Declaration
[JsonProperty("responseModalities")]
public virtual IList<string> ResponseModalities { get; set; }
Property Value
Type Description
IList<string>

ResponseSchema

Optional. Lets you to specify a schema for the model's response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the OpenAPI 3.0 schema object object. When this field is set, you must also set the response_mime_type to application/json.

Declaration
[JsonProperty("responseSchema")]
public virtual GoogleCloudAiplatformV1Schema ResponseSchema { get; set; }
Property Value
Type Description
GoogleCloudAiplatformV1Schema

RoutingConfig

Optional. Routing configuration.

Declaration
[JsonProperty("routingConfig")]
public virtual GoogleCloudAiplatformV1GenerationConfigRoutingConfig RoutingConfig { get; set; }
Property Value
Type Description
GoogleCloudAiplatformV1GenerationConfigRoutingConfig

Seed

Optional. A seed for the random number generator. By setting a seed, you can make the model's output mostly deterministic. For a given prompt and parameters (like temperature, top_p, etc.), the model will produce the same response every time. However, it's not a guaranteed absolute deterministic behavior. This is different from parameters like temperature, which control the level of randomness. seed ensures that the "random" choices the model makes are the same on every run, making it essential for testing and ensuring reproducible results.

Declaration
[JsonProperty("seed")]
public virtual int? Seed { get; set; }
Property Value
Type Description
int?

SpeechConfig

Optional. The speech generation config.

Declaration
[JsonProperty("speechConfig")]
public virtual GoogleCloudAiplatformV1SpeechConfig SpeechConfig { get; set; }
Property Value
Type Description
GoogleCloudAiplatformV1SpeechConfig

StopSequences

Optional. A list of character sequences that will stop the model from generating further tokens. If a stop sequence is generated, the output will end at that point. This is useful for controlling the length and structure of the output. For example, you can use ["\n", "###"] to stop generation at a new line or a specific marker.

Declaration
[JsonProperty("stopSequences")]
public virtual IList<string> StopSequences { get; set; }
Property Value
Type Description
IList<string>

Temperature

Optional. Controls the randomness of the output. A higher temperature results in more creative and diverse responses, while a lower temperature makes the output more predictable and focused. The valid range is (0.0, 2.0].

Declaration
[JsonProperty("temperature")]
public virtual float? Temperature { get; set; }
Property Value
Type Description
float?

ThinkingConfig

Optional. Configuration for thinking features. An error will be returned if this field is set for models that don't support thinking.

Declaration
[JsonProperty("thinkingConfig")]
public virtual GoogleCloudAiplatformV1GenerationConfigThinkingConfig ThinkingConfig { get; set; }
Property Value
Type Description
GoogleCloudAiplatformV1GenerationConfigThinkingConfig

TopK

Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a top_k of 40 means the model will choose the next word from the 40 most likely words.

Declaration
[JsonProperty("topK")]
public virtual float? TopK { get; set; }
Property Value
Type Description
float?

TopP

Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least top_p. This helps generate more diverse and less repetitive responses. For example, a top_p of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It's recommended to adjust either temperature or top_p, but not both.

Declaration
[JsonProperty("topP")]
public virtual float? TopP { get; set; }
Property Value
Type Description
float?

Implements

IDirectResponseSchema
In this article
Back to top Generated by DocFX