0

I am trying to make a microflow for integration of IBM Watson chatbot but getting problem figuring it out. can you just give me kick start??

I have tried using service credentials but can't figure out how they are supposed to go in there.

Skill Details

Skill Name: *skill name*
Skill ID:*skill ID*
Workspace ID:*Workspace ID*
Legacy v1 Workspace URL:https://gateway.watsonplatform.net/assistant/api...

Service Credentials

Service Credentials Name:*serivice credentials name*
Username:*userName*
Password:*password*

I'm not getting the right way to put the credentials to make a config file for the microflow i'm tryna make for the chatbot

1 Answers1

0

I don't know what your reference is, but there are a number of things in your sample that indicate it might be out of date. For example: username / password credentials are no longer used, instead an IAM API Key is required. Instead of a workspace id an assistant id is required.

If you are writing in Python and the watson-developer-cloud pypi module then the code should look something like - https://cloud.ibm.com/apidocs/assistant-v2?code=python#send-user-input-to-assistant

import watson_developer_cloud

service = watson_developer_cloud.AssistantV2(
    iam_apikey='{apikey}',
    version='2018-11-08',
    url='{url}'
)

response = service.message(
    assistant_id='{assistant_id}',
    session_id='{session_id}',
    input={
        'message_type': 'text',
        'text': 'Hello'
    }
).get_result()

Your config file should be providing values for apikey, url and assistant_id. Your code would need to use the API to retrieve the session id.

chughts
  • 4,210
  • 2
  • 14
  • 27
  • Hey, thanks for the reply man, I really appreciate it but can you guide me on how to implement that in mendix app within a microflow? – Andrew Chu Apr 01 '19 at 17:32