Google Cloud Discovery Engine V1 Client - Class GenerationSpec (1.2.0)

Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class GenerationSpec.

Content generation specification.

Generated from protobuf message google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GenerationSpec

Namespace

Google \ Cloud \ DiscoveryEngine \ V1 \ GenerateGroundedContentRequest

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ model_id string

Specifies which Vertex model id to use for generation.

↳ language_code string

Language code for content. Use language tags defined by BCP47.

↳ temperature float

If specified, custom value for the temperature will be used.

↳ top_p float

If specified, custom value for nucleus sampling will be used.

↳ top_k int

If specified, custom value for top-k sampling will be used.

↳ frequency_penalty float

If specified, custom value for frequency penalty will be used.

↳ presence_penalty float

If specified, custom value for presence penalty will be used.

↳ max_output_tokens int

If specified, custom value for max output tokens will be used.

getModelId

Specifies which Vertex model id to use for generation.

Returns
Type Description
string

setModelId

Specifies which Vertex model id to use for generation.

Parameter
Name Description
var string
Returns
Type Description
$this

getLanguageCode

Language code for content. Use language tags defined by BCP47.

Returns
Type Description
string

setLanguageCode

Language code for content. Use language tags defined by BCP47.

Parameter
Name Description
var string
Returns
Type Description
$this

getTemperature

If specified, custom value for the temperature will be used.

Returns
Type Description
float

hasTemperature

clearTemperature

setTemperature

If specified, custom value for the temperature will be used.

Parameter
Name Description
var float
Returns
Type Description
$this

getTopP

If specified, custom value for nucleus sampling will be used.

Returns
Type Description
float

hasTopP

clearTopP

setTopP

If specified, custom value for nucleus sampling will be used.

Parameter
Name Description
var float
Returns
Type Description
$this

getTopK

If specified, custom value for top-k sampling will be used.

Returns
Type Description
int

hasTopK

clearTopK

setTopK

If specified, custom value for top-k sampling will be used.

Parameter
Name Description
var int
Returns
Type Description
$this

getFrequencyPenalty

If specified, custom value for frequency penalty will be used.

Returns
Type Description
float

hasFrequencyPenalty

clearFrequencyPenalty

setFrequencyPenalty

If specified, custom value for frequency penalty will be used.

Parameter
Name Description
var float
Returns
Type Description
$this

getPresencePenalty

If specified, custom value for presence penalty will be used.

Returns
Type Description
float

hasPresencePenalty

clearPresencePenalty

setPresencePenalty

If specified, custom value for presence penalty will be used.

Parameter
Name Description
var float
Returns
Type Description
$this

getMaxOutputTokens

If specified, custom value for max output tokens will be used.

Returns
Type Description
int

hasMaxOutputTokens

clearMaxOutputTokens

setMaxOutputTokens

If specified, custom value for max output tokens will be used.

Parameter
Name Description
var int
Returns
Type Description
$this