Comments (2)
Ok, I managed to solve this by digging a little deeper into the source code. I will outline my steps below.
-
As mentioned here, environment is assumed to be
draft
and user to be-
if none is set. -
You need Dialogflow v2beta1, in botlib/dialogflow_session_client.js, change
"dialogflow": "0.8.0"
to
"dialogflow": "0.9.1"
-
Change the constructor in botlib/dialogflow_session_client.js, from
constructor(projectId){
this.sessionClient = new dialogflow.SessionsClient();
this.projectId = projectId;
}
to
constructor(projectId, environmentId, userId){
this.sessionClient = new dialogflow.v2beta1.SessionsClient();
this.projectId = projectId;
this.environmentId = environmentId;
this.userId = userId;
}
- Then in both
detectIntent...
promise, change
const sessionPath = this.sessionClient.sessionPath(
this.projectId, sessionId);
to
const sessionPath = this.sessionClient.environmentSessionPath(
this.projectId, this.environmentId, this.userId, sessionId);
- Lastly, in the server.js of any integration, add the new variables
const environmentId = 'YOUR_ENVIRONMENT_NAME';
const userId = 'ANY_36_CHARACTER_OR_LESS';
In the same server.js, change this line
const sessionClient = new dialogflowSessionClient(projectId);
to
const sessionClient = new dialogflowSessionClient(projectId, environmentId, userId);
Then re-deploy your integration using Cloud Run as per the instructions in the README.md
I will leave this open for now, for future visitors to easily find.
from dialogflow-integrations.
diamondobama, thanks for reporting the issue. Dialogflow team will be working on an improvement to support environment.
from dialogflow-integrations.
Related Issues (20)
- ERROR: gcloud crashed (PermissionError): [Errno 13] Permission denied: 'Dockerfile.save.1'
- hii
- Problem with my Agent when Integrated with Twilio for WhatsApp HOT 1
- not able to edit, says I need a branch
- Sometimes , twitter integration becomes to be disconnected
- Want an option to always show SendIcon in Dialogflow Messanger.
- server.js
- CX and Twilio SMS? HOT 1
- account id
- Error
- Pass Phone Info
- How can we use facebook integration for managing multiple page with one agent?
- Getting error while trying to deploy GCP function
- [FR] Officially allow facebook persona in dialogflow (or at least mention in document about facebook persona)
- [bug] Dialogflow facebook integration not response with customer_feedback payload
- Azure-Dialogflow CX Integration-Webchat Issue-GatewayTimeout HOT 3
- MS teams-DF CX Integration- Enable Calling
- Security considerations HOT 1
- Twitter integration
- In a chatbot conversation using dialogflow cx, Is there a way to make the bot speak first? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dialogflow-integrations.