【问题标题】:How to solve argument for parameter assistant (WatsonServicesAssistant)?如何解决参数助手(WatsonServicesAssistant)的参数?
【发布时间】:2019-04-01 18:05:12
【问题描述】:

我正在尝试创建一个用于集成 IBM Watson 聊天机器人的微流程,但在解决它时遇到了问题。你能给我启动一下吗??

我尝试过使用服务凭据,但不知道它们应该如何进入那里。

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*

我没有找到正确的方法来放置凭据来为我正在尝试为聊天机器人制作的微流制作配置文件

【问题讨论】:

    标签: python curl ibm-watson mendix


    【解决方案1】:

    我不知道您的参考是什么,但您的示例中有很多内容表明它可能已过时。例如:不再使用用户名/密码凭证,而是需要 IAM API 密钥。需要助手 id 而不是工作区 id。

    如果您使用 Python 和 watson-developer-cloud pypi 模块编写代码,那么代码应该类似于 - 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()
    

    您的配置文件应该为apikeyurlassistant_id 提供值。您的代码需要使用 API 来检索会话 ID。

    【讨论】:

    • 嘿,谢谢你的回复,我真的很感激,但你能指导我如何在微流中的 mendix 应用程序中实现它吗?
    猜你喜欢
    • 1970-01-01
    • 2010-09-16
    • 2019-08-23
    • 2015-09-03
    • 1970-01-01
    • 1970-01-01
    • 2013-08-03
    • 1970-01-01
    • 2013-10-03
    相关资源
    最近更新 更多