GoogleCloudPlatform / GoogleCloudPlatform/dialogflow-integrations
Passing contexts
- Dominant language
- JavaScript
- Stars
- 286
- Forks
- 547
- PR merge metrics
- No merged PRs in 30d
Description
There seems no way to pass contexts via this library to the actual detectIntent call. Value in this is if you want to maintain context over a long period of time (where Dialogflow would timeout).
Could the constructor and related function definitions not be changed to include this along lines of:
//add additional input variable below
constructRequest(text, sessionPath, payload, prevContexts) {
return {
session: sessionPath,
queryInput: {
text: {
text: text,
languageCode: 'en'
}
},
queryParams: {
payload: payload,
// Add context to queryParams
contexts: prevContexts
}
};
}
Contributor guide
Assessment
This issue has not been assessed yet.