如何解决参数助手(WatsonServicesAssistant)的参数?

问题描述 投票:0回答:1

我正在尝试为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个回答
0
投票

我不知道你的参考是什么,但你的样本中有很多东西表明它可能已经过时了。例如:不再使用用户名/密码凭据,而是需要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。

© www.soinside.com 2019 - 2024. All rights reserved.