GoogleCloudPlatform / GoogleCloudPlatform/dialogflow-integrations

Passing contexts

Open
#2 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.