Constructor
new SessionsClient(optionsopt)
Construct an instance of SessionsClient.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
The configuration object. See the subsequent parameters for more details. Properties
|
Members
(static) apiEndpoint
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
(static) port
The port for this API service.
(static) scopes
The scopes needed to make gRPC calls for every method defined in this service.
(static) servicePath
The DNS address for this API service.
Methods
close()
Terminate the GRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
detectIntent(request, optionsopt) → {Promise}
Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries.
Parameters:
| Name | Type | Attributes | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
||||||||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
environmentPath(project, environment) → {string}
Return a fully-qualified environment resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
string | |
environment |
string |
getProjectId(callback)
Return the project ID used by this class.
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
function |
the callback to be called with the current project Id. |
initialize() → {Promise}
Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
matchEnvironmentFromEnvironmentName(environmentName) → {string}
Parse the environment from Environment resource.
Parameters:
| Name | Type | Description |
|---|---|---|
environmentName |
string |
A fully-qualified path representing Environment resource. |
matchIntentFromProjectAgentIntentName(projectAgentIntentName) → {string}
Parse the intent from ProjectAgentIntent resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectAgentIntentName |
string |
A fully-qualified path representing project_agent_intent resource. |
matchIntentFromProjectLocationAgentIntentName(projectLocationAgentIntentName) → {string}
Parse the intent from ProjectLocationAgentIntent resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectLocationAgentIntentName |
string |
A fully-qualified path representing project_location_agent_intent resource. |
matchLocationFromProjectLocationAgentIntentName(projectLocationAgentIntentName) → {string}
Parse the location from ProjectLocationAgentIntent resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectLocationAgentIntentName |
string |
A fully-qualified path representing project_location_agent_intent resource. |
matchLocationFromProjectLocationAgentName(projectLocationAgentName) → {string}
Parse the location from ProjectLocationAgent resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectLocationAgentName |
string |
A fully-qualified path representing project_location_agent resource. |
matchLocationFromProjectLocationAgentSessionName(projectLocationAgentSessionName) → {string}
Parse the location from ProjectLocationAgentSession resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectLocationAgentSessionName |
string |
A fully-qualified path representing project_location_agent_session resource. |
matchProjectFromEnvironmentName(environmentName) → {string}
Parse the project from Environment resource.
Parameters:
| Name | Type | Description |
|---|---|---|
environmentName |
string |
A fully-qualified path representing Environment resource. |
matchProjectFromProjectAgentIntentName(projectAgentIntentName) → {string}
Parse the project from ProjectAgentIntent resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectAgentIntentName |
string |
A fully-qualified path representing project_agent_intent resource. |
matchProjectFromProjectAgentName(projectAgentName) → {string}
Parse the project from ProjectAgent resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectAgentName |
string |
A fully-qualified path representing project_agent resource. |
matchProjectFromProjectAgentSessionName(projectAgentSessionName) → {string}
Parse the project from ProjectAgentSession resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectAgentSessionName |
string |
A fully-qualified path representing project_agent_session resource. |
matchProjectFromProjectLocationAgentIntentName(projectLocationAgentIntentName) → {string}
Parse the project from ProjectLocationAgentIntent resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectLocationAgentIntentName |
string |
A fully-qualified path representing project_location_agent_intent resource. |
matchProjectFromProjectLocationAgentName(projectLocationAgentName) → {string}
Parse the project from ProjectLocationAgent resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectLocationAgentName |
string |
A fully-qualified path representing project_location_agent resource. |
matchProjectFromProjectLocationAgentSessionName(projectLocationAgentSessionName) → {string}
Parse the project from ProjectLocationAgentSession resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectLocationAgentSessionName |
string |
A fully-qualified path representing project_location_agent_session resource. |
matchSessionFromProjectAgentSessionName(projectAgentSessionName) → {string}
Parse the session from ProjectAgentSession resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectAgentSessionName |
string |
A fully-qualified path representing project_agent_session resource. |
matchSessionFromProjectLocationAgentSessionName(projectLocationAgentSessionName) → {string}
Parse the session from ProjectLocationAgentSession resource.
Parameters:
| Name | Type | Description |
|---|---|---|
projectLocationAgentSessionName |
string |
A fully-qualified path representing project_location_agent_session resource. |
projectAgentIntentPath(project, intent) → {string}
Return a fully-qualified projectAgentIntent resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
string | |
intent |
string |
projectAgentPath(project) → {string}
Return a fully-qualified projectAgent resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
string |
projectAgentSessionPath(project, session) → {string}
Return a fully-qualified projectAgentSession resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
string | |
session |
string |
projectLocationAgentIntentPath(project, location, intent) → {string}
Return a fully-qualified projectLocationAgentIntent resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
string | |
location |
string | |
intent |
string |
projectLocationAgentPath(project, location) → {string}
Return a fully-qualified projectLocationAgent resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
string | |
location |
string |
projectLocationAgentSessionPath(project, location, session) → {string}
Return a fully-qualified projectLocationAgentSession resource name string.
Parameters:
| Name | Type | Description |
|---|---|---|
project |
string | |
location |
string | |
session |
string |
streamingDetectIntent(optionsopt) → {Stream}
Processes a natural language query in audio format in a streaming fashion and returns structured, actionable data as a result. This method is only available via the gRPC API (not REST).
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
options |
object |
<optional> |
Call options. See CallOptions for more details. |