简体   繁体   中英

Create a dialog via Python in Watson Assistant

I have been using the Watson Assistant's user interface to create dialogs for a few months. The node based system have worked fine for me so far, however I have reached a complexity that might be better handled through a code.

I have found the Watson API, but as I see, the purpose of that is to authenticate the user, manage sessions, and relay the user utterances to the AI. And the Developer Cloud API is used to manage and connect IBM Cloud services.

Is there a way to create a dialog through code instead of using the node based approach that appears in all of the tutorials?

You can create dialog nodes too.

Check the examples on github where they use AssistantV1 or AssistantV2 modules.

Can you please clarify what you mean by implementation through code? Do you mean that you want to use Python to process an utterance instead of calling the Watson Assistant service, or do you want to use the SDK to configure dialog instead of using the dashboard? If you're wanting to use Python (custom code) to process an utterance I would include logic in the application process a particular condition in either the request or response JSON.

Watson Assistant V2 SDK only contains methods to create a session and send a message (with some options to customize the responses from these API calls) assuming at the user will configure the intents, entities and dialog through thee dashboard. The V1 SDK has a lot more methods, but most of it is just things that can be done in the dashboard.

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