Class GenerationConfig (1.62.0)

GenerationConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Attributes

Name Description
temperature float
Optional. Controls the randomness of predictions. This field is a member of oneof_ _temperature.
top_p float
Optional. If specified, nucleus sampling will be used. This field is a member of oneof_ _top_p.
top_k float
Optional. If specified, top-k sampling will be used. This field is a member of oneof_ _top_k.
candidate_count int
Optional. Number of candidates to generate. This field is a member of oneof_ _candidate_count.
max_output_tokens int
Optional. The maximum number of output tokens to generate per message. This field is a member of oneof_ _max_output_tokens.
stop_sequences MutableSequence[str]
Optional. Stop sequences.
presence_penalty float
Optional. Positive penalties. This field is a member of oneof_ _presence_penalty.
frequency_penalty float
Optional. Frequency penalties. This field is a member of oneof_ _frequency_penalty.
seed int
Optional. Seed. This field is a member of oneof_ _seed.
response_mime_type str
Optional. Output response mimetype of the generated candidate text. Supported mimetype: - text/plain: (default) Text output. - application/json: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.
response_schema google.cloud.aiplatform_v1beta1.types.Schema
Optional. The Schema object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an `OpenAPI 3.0 schema object
routing_config google.cloud.aiplatform_v1beta1.types.GenerationConfig.RoutingConfig
Optional. Routing configuration. This field is a member of oneof_ _routing_config.

Classes

RoutingConfig

RoutingConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The configuration for routing the request to a specific model.

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

Methods

GenerationConfig

GenerationConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)