From c989040538f88ebc7a999df67c38fa13d134db1a Mon Sep 17 00:00:00 2001 From: Erika Dsouza Date: Thu, 25 Jan 2018 17:59:16 -0500 Subject: [PATCH 1/2] [ci skip] Update readme --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 507780241..b74d3af48 100755 --- a/README.md +++ b/README.md @@ -66,6 +66,22 @@ Version 1.0 focuses on the move to programmatically-generated code for many of t ## Migration This version includes many breaking changes as a result of standardizing behavior across the new generated services. Full details on migration from previous versions can be found [here](https://github.com/watson-developer-cloud/python-sdk/wiki/Migration). +## Configuring the http client +To set client configs like timeout use the `with_http_config()` function and pass it a dictionary of configs. + +```python +from watson_developer_cloud import ConversationV1 + +conversation = ConversationV1( + username='xxx', + password='yyy', + version='2017-04-21') + +conversation.set_http_config({'timeout': 100}); +response = conversation.message(workspace_id=workspace_id, input={ + 'text': 'What\'s the weather like?'}) +print(json.dumps(response, indent=2)) +``` ## Known Issues See [issues](https://github.com/watson-developer-cloud/python-sdk/issues). From c17600143baa65ad1df22ad10a2e60a83236ca6f Mon Sep 17 00:00:00 2001 From: Noctis Lucis Date: Wed, 31 Jan 2018 13:09:48 +0800 Subject: [PATCH 2/2] Delete semicolon --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b74d3af48..736bc57b1 100755 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ conversation = ConversationV1( password='yyy', version='2017-04-21') -conversation.set_http_config({'timeout': 100}); +conversation.set_http_config({'timeout': 100}) response = conversation.message(workspace_id=workspace_id, input={ 'text': 'What\'s the weather like?'}) print(json.dumps(response, indent=2))