Closed jhoelzl closed 6 years ago
Take a look at the example for Assistant V2 https://github.com/watson-developer-cloud/python-sdk/blob/master/examples/assistant_v2.py
The URL is https://gateway.watsonplatform.net/assistant/api
. When in your code you use AssistantV2
.
from watson_developer_cloud import AssistantV2
# If service instance provides API key authentication
# assistant = AssistantV2(
# version='2017-04-21',
# url='https://gateway.watsonplatform.net/assistant/api',
# iam_apikey='iam_apikey')
assistant = AssistantV2(
username='YOUR SERVICE USERNAME',
password='YOUR SERVICE PASSWORD',
url='https://gateway.watsonplatform.net/assistant/api',
version='2017-04-21')
Hi @germanattanasio , as stated in https://console.bluemix.net/docs/services/assistant/release-notes.html#releaseinformationen, the "only supported version" for AssistantV2 is 2018-09-20
.
So, maybe the example code is not correct with version 2017-04-21
.
The problem is the line
session = assistant.create_session("<YOUR ASSISTANT ID>").get_result()
Here i replace <YOUR ASSISTANT ID>
with my IBM workspace ID, but i always get:
exception": "Error: Unknown error, Code: 404 , X-dp-watson-tran-id: gateway02-3248073405 , X-global-transaction-id: ffea405d5bbc6710c199aabd"
@jhoelzl the Assistant id is not the workspace id. Assistant v2 added new features like Agents and Skills. Make sure you read the documentation https://www.ibm.com/watson/developercloud/assistant/api/v2/curl.html?curl
@germanattanasio thanks for this info. I have only an IBM Lite account, so i also created a new IBM Assistant Deployment (in UK), but i always get the "old version" with "workspaces / intents" instead of "assistants /skills". So i guess, this new feature is not fully deployed for all customers...
It's in beta. From the tool you should be able to get the invite
Hello,
i am using Python 3.5.2 and i want to migrate from AssistantV1 to AssistantV2.
AssistantV1 with API Version "2018-09-20" works for me, so i tried the V2 example script (https://github.com/watson-developer-cloud/python-sdk/blob/master/examples/assistant_v2.py).
However, when i want to make an initial session, i always get this error:
Of course, i also changed the URL from
https://gateway.watsonplatform.net/assistant/api'
tohttps://gateway.watsonplatform.net/assistant/api/v2'
.My IBM Assistant Agents are hosted in UK.
Any suggestions? Regards, Josef