Google Cloud Discovery Engine V1 Client - Class GenerationConfig (1.17.0)

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

Configuration for the generation of the assistant response.

Generated from protobuf message google.cloud.discoveryengine.v1.Assistant.GenerationConfig

Namespace

Google \ Cloud \ DiscoveryEngine \ V1 \ Assistant

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ default_model_id string

Optional. The default model to use for assistant.

↳ allowed_model_ids string[]

Optional. The list of models that are allowed to be used for assistant.

↳ system_instruction GenerationConfig\SystemInstruction

System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions

↳ default_language string

The default language to use for the generation of the assistant response. Use an ISO 639-1 language code such as en. If not specified, the language will be automatically detected.

getDefaultModelId

Optional. The default model to use for assistant.

Returns
Type Description
string

setDefaultModelId

Optional. The default model to use for assistant.

Parameter
Name Description
var string
Returns
Type Description
$this

getAllowedModelIds

Optional. The list of models that are allowed to be used for assistant.

Returns
Type Description
Google\Protobuf\RepeatedField<string>

setAllowedModelIds

Optional. The list of models that are allowed to be used for assistant.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getSystemInstruction

System instruction, also known as the prompt preamble for LLM calls.

See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions

Returns
Type Description
GenerationConfig\SystemInstruction|null

hasSystemInstruction

clearSystemInstruction

setSystemInstruction

System instruction, also known as the prompt preamble for LLM calls.

See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions

Parameter
Name Description
var GenerationConfig\SystemInstruction
Returns
Type Description
$this

getDefaultLanguage

The default language to use for the generation of the assistant response.

Use an ISO 639-1 language code such as en. If not specified, the language will be automatically detected.

Returns
Type Description
string

setDefaultLanguage

The default language to use for the generation of the assistant response.

Use an ISO 639-1 language code such as en. If not specified, the language will be automatically detected.

Parameter
Name Description
var string
Returns
Type Description
$this