Skip to content

Commit 8338959

Browse files
committed
minor changes to doco
1 parent b344535 commit 8338959

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

examples/conversation_tone_analyzer_integration/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
This example provides sample code for integrating [Tone Analyzer][tone_analyzer] and [Conversation][conversation].
44

5-
* [tone_detection.py][tone_conversation_integration_example_tone_detection] - sample code to initialize a user object in the conversation payload's context (initUser), and to update tone in the user object in the conversation payload's context (updateUserTone).
5+
* [tone_detection.py][tone_conversation_integration_example_tone_detection] - sample code to initialize a user object in the conversation payload's context (initUser), to call Tone Analyzer to retrieve tone for a user's input (invokeToneAsync), and to update tone in the user object in the conversation payload's context (updateUserTone).
66

7-
* [tone_conversation_integration.v1.py][tone_conversation_integration_example] - sample code to use tone_detection.py to get and add tone to the payload and send a request to the Conversation Service's message endpoint.
7+
* [tone_conversation_integration.v1.py][tone_conversation_integration_example] - sample code to use tone_detection.py to get and add tone to the payload and send a request to the Conversation Service's message endpoint both in a synchronous and asynchronous manner.
88

99

1010
Requirements to run the sample code

examples/conversation_tone_analyzer_integration/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# TODO: are these needed?
1615
from .watson_developer_cloud_service import WatsonDeveloperCloudService
1716
from .watson_developer_cloud_service import WatsonException
1817
from .watson_developer_cloud_service import WatsonInvalidArgument
1918
from .conversation_v1 import ConversationV1
2019
from .tone_analyzer_v3 import ToneAnalyzerV3
2120

22-
# TODO: do I need the version library?
21+
2322
from .version import __version__

examples/conversation_tone_analyzer_integration/tone_conversation_integration.v1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# load the .env file containing your environment variables for the required services (conversation and tone)
1313
load_dotenv(find_dotenv())
1414

15-
# replace with your own conversation credentials or put them in a .env file in the home directory
15+
# replace with your own conversation credentials or put them in a .env file
1616
conversation = ConversationV1(
1717
username=os.environ.get('CONVERSATION_USERNAME') or 'YOUR SERVICE NAME',
1818
password=os.environ.get('CONVERSATION_PASSWORD') or 'YOUR PASSWORD',
@@ -63,7 +63,7 @@ async def invokeToneConversationAsync (payload, maintainToneHistoryInContext):
6363
print(json.dumps(response, indent=2))
6464

6565

66-
# how to invoke both versions of the tone aware calls to conversation
66+
# invoke tone aware calls to conversation - either synchronously or asynchronously
6767

6868
# synchronous call to conversation with tone included in the context
6969
invokeToneConversation(payload,maintainToneHistoryInContext)

0 commit comments

Comments
 (0)