Skip to content

Commit

Permalink
examples(assistantv2):Update assistantv2 examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ehdsouza committed Aug 28, 2019
1 parent 7099563 commit 1e2d48f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/assistant_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from ibm_watson import AssistantV1
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator

authenticator = IAMAuthenticator('your api key')
authenticator = IAMAuthenticator('your apikey')
assistant = AssistantV1(
version='2018-07-10',
## url is optional, and defaults to the URL below. Use the correct URL for your region.
Expand Down
12 changes: 3 additions & 9 deletions examples/assistant_v2.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
from __future__ import print_function
import json
from ibm_watson import AssistantV2
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator

# If service instance provides API key authentication
authenticator = IAMAuthenticator('your apikey')
assistant = AssistantV2(
version='2018-09-20',
## url is optional, and defaults to the URL below. Use the correct URL for your region.
url='https://gateway.watsonplatform.net/assistant/api',
iam_apikey='YOUR APIKEY')

# assistant = AssistantV2(
# username='YOUR SERVICE USERNAME',
# password='YOUR SERVICE PASSWORD',
# ## url is optional, and defaults to the URL below. Use the correct URL for your region.
# url='https://gateway.watsonplatform.net/assistant/api',
# version='2018-09-20')
authenticator=authenticator)

#########################
# Sessions
Expand Down

0 comments on commit 1e2d48f

Please sign in to comment.