Google Cloud Discovery Engine V1 Client - Class StreamAssistRequest (1.7.0)

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

Request for the AssistantService.StreamAssist method.

Generated from protobuf message google.cloud.discoveryengine.v1.StreamAssistRequest

Namespace

Google \ Cloud \ DiscoveryEngine \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

Required. The resource name of the Assistant. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}

↳ query Query

Optional. Current user query. Empty query is only supported if file_ids are provided. In this case, the answer will be generated based on those context files.

↳ session string

Optional. The session to use for the request. If specified, the assistant has access to the session history, and the query and the answer are stored there. If - is specified as the session ID, or it is left empty, then a new session is created with an automatically generated ID. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}

↳ user_metadata AssistUserMetadata

Optional. Information about the user initiating the query.

↳ tools_spec StreamAssistRequest\ToolsSpec

Optional. Specification of tools that are used to serve the request.

↳ generation_spec StreamAssistRequest\GenerationSpec

Optional. Specification of the generation configuration for the request.

getName

Required. The resource name of the Assistant. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}

Returns
Type Description
string

setName

Required. The resource name of the Assistant. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}

Parameter
Name Description
var string
Returns
Type Description
$this

getQuery

Optional. Current user query.

Empty query is only supported if file_ids are provided. In this case, the answer will be generated based on those context files.

Returns
Type Description
Query|null

hasQuery

clearQuery

setQuery

Optional. Current user query.

Empty query is only supported if file_ids are provided. In this case, the answer will be generated based on those context files.

Parameter
Name Description
var Query
Returns
Type Description
$this

getSession

Optional. The session to use for the request. If specified, the assistant has access to the session history, and the query and the answer are stored there.

If - is specified as the session ID, or it is left empty, then a new session is created with an automatically generated ID. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}

Returns
Type Description
string

setSession

Optional. The session to use for the request. If specified, the assistant has access to the session history, and the query and the answer are stored there.

If - is specified as the session ID, or it is left empty, then a new session is created with an automatically generated ID. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}

Parameter
Name Description
var string
Returns
Type Description
$this

getUserMetadata

Optional. Information about the user initiating the query.

Returns
Type Description
AssistUserMetadata|null

hasUserMetadata

clearUserMetadata

setUserMetadata

Optional. Information about the user initiating the query.

Parameter
Name Description
var AssistUserMetadata
Returns
Type Description
$this

getToolsSpec

Optional. Specification of tools that are used to serve the request.

Returns
Type Description
StreamAssistRequest\ToolsSpec|null

hasToolsSpec

clearToolsSpec

setToolsSpec

Optional. Specification of tools that are used to serve the request.

Parameter
Name Description
var StreamAssistRequest\ToolsSpec
Returns
Type Description
$this

getGenerationSpec

Optional. Specification of the generation configuration for the request.

Returns
Type Description
StreamAssistRequest\GenerationSpec|null

hasGenerationSpec

clearGenerationSpec

setGenerationSpec

Optional. Specification of the generation configuration for the request.

Parameter
Name Description
var StreamAssistRequest\GenerationSpec
Returns
Type Description
$this