This commit is contained in:
Dave Horton
2024-08-22 08:14:51 -04:00
parent 8d4d09ddd3
commit ad7de3e5e3

View File

@@ -20,7 +20,10 @@ class Dialogflow extends Task {
assert(this.agent || !this.isCX, 'agent is required for dialogflow cx'); assert(this.agent || !this.isCX, 'agent is required for dialogflow cx');
assert(this.credentials, 'dialogflow credentials are required'); assert(this.credentials, 'dialogflow credentials are required');
if (!this.isCX) { if (this.isCX) {
this.environment = this.data.environment || 'default';
}
else {
/* ES: set project id with environment and region (optionally) */ /* ES: set project id with environment and region (optionally) */
if (this.data.environment && this.data.region) { if (this.data.environment && this.data.region) {
this.project = `${this.data.project}:${this.data.environment}:${this.data.region}`; this.project = `${this.data.project}:${this.data.environment}:${this.data.region}`;