Skip to content

Commit 8689137

Browse files
Update README.md
1 parent d09dc40 commit 8689137

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -387,19 +387,19 @@ Every SDK call returns a response with a transaction ID in the `X-Global-Transac
387387

388388
### Suceess
389389
```python
390-
from ibm_watson import MyService
390+
from ibm_watson import AssistantV1
391391

392-
service = MyService(authenticator=my_authenticator)
392+
service = AssistantV1(authenticator={my_authenticator})
393393
response_headers = service.my_service_call().get_headers()
394394
print(response_headers.get('X-Global-Transaction-Id'))
395395
```
396396

397397
### Failure
398398
```python
399-
from ibm_watson import MyService, ApiException
399+
from ibm_watson import AssistantV1, ApiException
400400

401401
try:
402-
service = MyService(authenticator=my_authenticators)
402+
service = AssistantV1(authenticator={my_authenticator})
403403
service.my_service_call()
404404
except ApiException as e:
405405
print(e.global_transaction_id)
@@ -410,9 +410,9 @@ except ApiException as e:
410410
However, the transaction ID isn't available when the API doesn't return a response for some reason. In that case, you can set your own transaction ID in the request. For example, replace `<my-unique-transaction-id>` in the following example with a unique transaction ID.
411411

412412
```python
413-
from ibm_watson import MyService
413+
from ibm_watson import AssistantV1
414414

415-
service = MyService(authenticator=my_authenticator)
415+
service = AssistantV1(authenticator={my_authenticator})
416416
service.my_service_call(headers={'X-Global-Transaction-Id': '<my-unique-transaction-id>'})
417417
```
418418

0 commit comments

Comments
 (0)