Class GenerationConfig (1.44.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.

Methods

GenerationConfig

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