dialogflow version: 0.5.0const projectId = 'foo';
const sessionId = 'bar';
const path = sessionClient.environmentSessionPath(projectId, 'draft', '-', sessionId);
// const path = 'projects/foo/agent/environments/draft/users/-/sessions/bar';
const payload = {
queryInput: {text: {text: 'hallo', languageCode: 'de'}},
session: path,
queryParams:
{
timeZone: 'Europe/Berlin',
contexts: []
}
};
sessionClient
.detectIntent(payload)
.then((responses: any) => {
console.log('Success!');
}).catch((error: any) => {
console.error('Error');
// Error: 5 NOT_FOUND: Environment with id 'draft' was not found.
});
Based on the documentation, I would expect that the current draft version is targeted.
Do you found a solution? I'm having the same issue.
Unfortunately not. I guess we'll need some support from @xVir , @sstepashka or somebody else from Google.
draft is not an environment.
Try : 'projects/foo/agent/sessions/bar' if you want to configure 'draft'
@premsvuppala yes, I know that solution.
If draft is not an environment, the documentation needs to be updated. The projects code says:
Required. The unique identifier of the context. Format:
projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>,
or
projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>/contexts/<Context ID>. Note: Environments and
users are under construction and will be available soon. The Context ID is
always converted to lowercase. Ifis not specified, we
assume default 'draft' environment. Ifis not specified, we
assume default '-' user.
Thanks for reporting this issue!
We have a proposed fix and should be on live after 6/27.
@Jeremy-WEI is this supposed to be live yet?
Hi JohannesKuehnel,
Sorry, there was some delay in our release schedule. It should be live by EOD or by tomorrow.
I can confirm that this bug is now fixed for me. Therefore, I'll close this issue.
Most helpful comment
Thanks for reporting this issue!
We have a proposed fix and should be on live after 6/27.