Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class StreamAssistResponse.
Response for the AssistantService.StreamAssist method.
Generated from protobuf message google.cloud.discoveryengine.v1.StreamAssistResponse
Namespace
Google \ Cloud \ DiscoveryEngine \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ answer |
AssistAnswer
Assist answer resource object containing parts of the assistant's final answer for the user's query. Not present if the current response doesn't add anything to previously sent AssistAnswer.replies. Observe AssistAnswer.state to see if more parts are to be expected. While the state is |
↳ session_info |
StreamAssistResponse\SessionInfo
Session information. Only included in the final StreamAssistResponse of the response stream. |
↳ assist_token |
string
A global unique ID that identifies the current pair of request and stream of responses. Used for feedback and support. |
↳ invocation_tools |
string[]
The tool names of the tools that were invoked. |
↳ invoked_skills |
array<StreamAssistResponse\InvokedSkill>
The skills executed during the turn. |
↳ connector_auth_errors |
array<StreamAssistResponse\ConnectorAuthError>
Per-connector authentication errors encountered during the request. Present when one or more connectors failed authentication but the request proceeded with the remaining connectors. |
getAnswer
Assist answer resource object containing parts of the assistant's final answer for the user's query.
Not present if the current response doesn't add anything to previously
sent
AssistAnswer.replies.
Observe
AssistAnswer.state to
see if more parts are to be expected. While the state is IN_PROGRESS, the
AssistAnswer.replies
field in each response will contain replies (reply fragments) to be
appended to the ones received in previous responses.
AssistAnswer.name
won't be filled.
If the state is SUCCEEDED, FAILED or SKIPPED, the response
is the last response and
AssistAnswer.name will
have a value.
| Returns | |
|---|---|
| Type | Description |
AssistAnswer|null |
|
hasAnswer
clearAnswer
setAnswer
Assist answer resource object containing parts of the assistant's final answer for the user's query.
Not present if the current response doesn't add anything to previously
sent
AssistAnswer.replies.
Observe
AssistAnswer.state to
see if more parts are to be expected. While the state is IN_PROGRESS, the
AssistAnswer.replies
field in each response will contain replies (reply fragments) to be
appended to the ones received in previous responses.
AssistAnswer.name
won't be filled.
If the state is SUCCEEDED, FAILED or SKIPPED, the response
is the last response and
AssistAnswer.name will
have a value.
| Parameter | |
|---|---|
| Name | Description |
var |
AssistAnswer
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getSessionInfo
Session information. Only included in the final StreamAssistResponse of the response stream.
| Returns | |
|---|---|
| Type | Description |
StreamAssistResponse\SessionInfo|null |
|
hasSessionInfo
clearSessionInfo
setSessionInfo
Session information. Only included in the final StreamAssistResponse of the response stream.
| Parameter | |
|---|---|
| Name | Description |
var |
StreamAssistResponse\SessionInfo
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getAssistToken
A global unique ID that identifies the current pair of request and stream of responses. Used for feedback and support.
| Returns | |
|---|---|
| Type | Description |
string |
|
setAssistToken
A global unique ID that identifies the current pair of request and stream of responses. Used for feedback and support.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getInvocationTools
The tool names of the tools that were invoked.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\RepeatedField<string> |
|
setInvocationTools
The tool names of the tools that were invoked.
| Parameter | |
|---|---|
| Name | Description |
var |
string[]
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getInvokedSkills
The skills executed during the turn.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\RepeatedField<StreamAssistResponse\InvokedSkill> |
|
setInvokedSkills
The skills executed during the turn.
| Parameter | |
|---|---|
| Name | Description |
var |
array<StreamAssistResponse\InvokedSkill>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getConnectorAuthErrors
Per-connector authentication errors encountered during the request.
Present when one or more connectors failed authentication but the request proceeded with the remaining connectors.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\RepeatedField<StreamAssistResponse\ConnectorAuthError> |
|
setConnectorAuthErrors
Per-connector authentication errors encountered during the request.
Present when one or more connectors failed authentication but the request proceeded with the remaining connectors.
| Parameter | |
|---|---|
| Name | Description |
var |
array<StreamAssistResponse\ConnectorAuthError>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|