Reference documentation and code samples for the Vertex AI V1 API class Google::Cloud::AIPlatform::V1::GenerationConfig.
Generation config.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#candidate_count
def candidate_count() -> ::Integer
Returns
- (::Integer) — Optional. Number of candidates to generate.
#candidate_count=
def candidate_count=(value) -> ::Integer
Parameter
- value (::Integer) — Optional. Number of candidates to generate.
Returns
- (::Integer) — Optional. Number of candidates to generate.
#frequency_penalty
def frequency_penalty() -> ::Float
Returns
- (::Float) — Optional. Frequency penalties.
#frequency_penalty=
def frequency_penalty=(value) -> ::Float
Parameter
- value (::Float) — Optional. Frequency penalties.
Returns
- (::Float) — Optional. Frequency penalties.
#max_output_tokens
def max_output_tokens() -> ::Integer
Returns
- (::Integer) — Optional. The maximum number of output tokens to generate per message.
#max_output_tokens=
def max_output_tokens=(value) -> ::Integer
Parameter
- value (::Integer) — Optional. The maximum number of output tokens to generate per message.
Returns
- (::Integer) — Optional. The maximum number of output tokens to generate per message.
#presence_penalty
def presence_penalty() -> ::Float
Returns
- (::Float) — Optional. Positive penalties.
#presence_penalty=
def presence_penalty=(value) -> ::Float
Parameter
- value (::Float) — Optional. Positive penalties.
Returns
- (::Float) — Optional. Positive penalties.
#response_mime_type
def response_mime_type() -> ::String
Returns
-
(::String) —
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_mime_type=
def response_mime_type=(value) -> ::String
Parameter
-
value (::String) —
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.
Returns
-
(::String) —
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.
#stop_sequences
def stop_sequences() -> ::Array<::String>
Returns
- (::Array<::String>) — Optional. Stop sequences.
#stop_sequences=
def stop_sequences=(value) -> ::Array<::String>
Parameter
- value (::Array<::String>) — Optional. Stop sequences.
Returns
- (::Array<::String>) — Optional. Stop sequences.
#temperature
def temperature() -> ::Float
Returns
- (::Float) — Optional. Controls the randomness of predictions.
#temperature=
def temperature=(value) -> ::Float
Parameter
- value (::Float) — Optional. Controls the randomness of predictions.
Returns
- (::Float) — Optional. Controls the randomness of predictions.
#top_k
def top_k() -> ::Float
Returns
- (::Float) — Optional. If specified, top-k sampling will be used.
#top_k=
def top_k=(value) -> ::Float
Parameter
- value (::Float) — Optional. If specified, top-k sampling will be used.
Returns
- (::Float) — Optional. If specified, top-k sampling will be used.
#top_p
def top_p() -> ::Float
Returns
- (::Float) — Optional. If specified, nucleus sampling will be used.
#top_p=
def top_p=(value) -> ::Float
Parameter
- value (::Float) — Optional. If specified, nucleus sampling will be used.
Returns
- (::Float) — Optional. If specified, nucleus sampling will be used.