简体   繁体   中英

Is the "dialogflow-fulfillment-nodejs" library still maintained or do I need to switch to the "Dialogflow API: Node.js Client" library?

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?

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.

引擎版本

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).

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM