3

I realized in the github of the library "dialogflow-fulfillment-nodejs" that there are no new updates and many discussions about whether the library will continue even in the "README.md" they wrote "Warning: This library is no longer maintained. It should only be used when using the inline editor. "

I've been doing tests with the In-line Editor on DialogFlow but I realized that when I changed the Cloud Functions the version from Node 8 to Node 10, because Firebase says that the support for Node 8 will end, I thought about changing the version, however I had a lot of problems when doing Deploy in the In-line Editor so I thought if the problem of the library itself that still uses Node 6 in package.json?

Is that a problem with this library that still uses Node 6 so when changing to Node 10 in Cloud Functions he stopped doing Deploy?

What should I use in my webhook service?

Victor_Manuel
  • 75
  • 2
  • 9

2 Answers2

3

As you can read from the public repository, the library is not longer maintained. However, it also says:

... it should only be used when using the inline editor

Also when looking at the Dialogflow console under the Fulfillment section the Inline Editor option when enabled, it states:

Newly created cloud functions now use Node.js 10 as runtime engine. Check migration guide for more details.

For a graphical reference, see img.

I've created my last Cloud Function recently and can confirm that when looking at the package.json file the engine has the version properly set.

engine version

So even if the library is no longer maintained, the support within the Inline Editor remains available and I don't see anything about it being deprecated on their documentation. My conclusion is that you can use it with confidence.

Finally, regarding your issue about deploying the Cloud Function using the Inline Editor, it may be because of something else. My guess is that you or someone with the required permissions, made a change on the Cloud Function directly and not using the Inline Editor; thus, falling in an scenario mentioned on the limitations section, that states the following:

If you modify your code with the Cloud Functions console, you can no longer use the inline editor to modify your code. Your function will continue to provide fulfillment for your agent, but future edits must be made in the Cloud Functions console.

If you would like to keep using Inline Editor to deploy your future changes, I suggest you to backup your Cloud Function, and create a new one using Inline Editor (for that you may need to disable the Inline Editor and remove manually the Cloud Function previously created, remember to backup your code and configuration).

S. Tyr
  • 639
  • 4
  • 12
  • Currently it is like this but when I started my project at the beginning of the year it came with node 8 in the In-Line Editor and when I just changed the Node version to 10 in Cloud Functions he did not deploy in the In-Line Editor so I went to Cloud Functions and inverted to node 8 and returned to deploy via the In-line Editor. – Victor_Manuel Sep 17 '20 at 17:32
  • It seems that this issue was mitigated around the time (and probably a bit earlier) that Node.js 8 was being deprecated, on June 2020, as per July I can see that this fix was available https://cloud.google.com/functions/docs/concepts/nodejs-8-runtime https://stackoverflow.com/a/63020143/2615248 – S. Tyr Sep 18 '20 at 13:53
  • When having issues like this, you can report them using Issue Trackers following https://cloud.google.com/support/docs/issue-trackers – S. Tyr Sep 18 '20 at 13:59
1

The Dialogflow API: Node.js Client is not a library for use in the fulfillment webhook. It is meant to be used as a client that calls Dialogflow to either build/edit agents or submit content to determine a matching Intent.

For webhooks, you're expected to parse the JSON yourself and send a validly formatted JSON as part of the response. While the dialogflow-fulfillment-nodejs library isn't deprecated, as noted, it also isn't maintained. So if Dialogflow ES ever does get updates - the library likely will not. There are third-party libraries such as multivocal that are being worked on to provide fulfillment, and these can work in the inline editor.

Prisoner
  • 49,922
  • 7
  • 53
  • 105