File tree Expand file tree Collapse file tree 8 files changed +27
-19
lines changed Expand file tree Collapse file tree 8 files changed +27
-19
lines changed Original file line number Diff line number Diff line change 11require ( "watson_apis/assistant_v1" )
22
33assistant = AssistantV1 (
4- username : "YOUR SERVICE USERNAME" ,
5- password : "YOUR SERVICE PASSWORD" ,
4+ # username: "YOUR SERVICE USERNAME",
5+ # password: "YOUR SERVICE PASSWORD",
6+ iam_api_key : "IAM API KEY" ,
67 version : "2018-02-16"
78)
89
Original file line number Diff line number Diff line change 11require ( "watson_apis/discovery_v1" )
22
33discovery = WatsonAPIs ::DiscoveryV1 . new (
4- version : "2018-03-05" ,
5- username : "username" ,
6- password : "password"
4+ # username: "username",
5+ # password: "password",
6+ iam_api_key : "IAM API KEY" ,
7+ version : "2018-03-05"
78)
89
910environments = discovery . list_environments . body
Original file line number Diff line number Diff line change 11require ( "watson_apis/natural_language_classifier_v1" )
22
33natural_language_classifier = WatsonAPIs ::NaturalLanguageClassifierV1 . new (
4- username : "YOUR SERVICE USERNAME" ,
5- password : "YOUR SERVICE PASSWORD"
4+ # username: "YOUR SERVICE USERNAME",
5+ # password: "YOUR SERVICE PASSWORD"
6+ iam_api_key : "IAM API KEY"
67)
78
89classifiers = natural_language_classifier . list_classifiers . body
Original file line number Diff line number Diff line change 11require ( "watson_apis/natural_language_understanding_v1" )
22
33natural_language_understanding = WatsonAPIs ::NaturalLanguageUnderstandingV1 . new (
4- version : "2018-03-16" ,
5- username : "YOUR SERVICE USERNAME" ,
6- password : "YOUR SERVICE PASSWORD"
4+ # username: "YOUR SERVICE USERNAME",
5+ # password: "YOUR SERVICE PASSWORD",
6+ iam_api_key : "IAM API KEY" ,
7+ version : "2018-03-16"
78)
89
910response = natural_language_understanding . analyze (
Original file line number Diff line number Diff line change 44# ../resources/personality-v3-expect2.txt
55
66personality_insights = WatsonAPIs ::PersonalityInsightsV3 . new (
7- version : "2017-10-13" ,
8- username : "YOUR SERVICE USERNAME" ,
9- password : "YOUR SERVICE PASSWORD"
7+ # username: "YOUR SERVICE USERNAME",
8+ # password: "YOUR SERVICE PASSWORD",
9+ iam_api_key : "IAM API KEY" ,
10+ version : "2017-10-13"
1011)
1112profile = nil
1213File . open ( Dir . getwd + "/resources/personality-v3.json" ) do |profile_json |
Original file line number Diff line number Diff line change 22require ( "watson_apis/recognize_callback" )
33
44speech_to_text = WatsonAPIs ::SpeechToTextV1 . new (
5- username : "YOUR SERVICE USERNAME" ,
6- password : "YOUR SERVICE PASSWORD"
5+ # username: "YOUR SERVICE USERNAME",
6+ # password: "YOUR SERVICE PASSWORD"
7+ iam_api_key : "IAM API KEY"
78)
89
910p speech_to_text . list_models . body
Original file line number Diff line number Diff line change 11require ( "watson_apis/text_to_speech_v1" )
22
33text_to_speech = WatsonAPIs ::TextToSpeechV1 . new (
4- username : "YOUR SERVICE USERNAME" ,
5- password : "YOUR SERVICE PASSWORD"
4+ # username: "YOUR SERVICE USERNAME",
5+ # password: "YOUR SERVICE PASSWORD"
6+ iam_api_key : "IAM API KEY"
67)
78
89p text_to_speech . list_voices . body
Original file line number Diff line number Diff line change 22require ( "json" )
33
44tone_analyzer = ToneAnalyzerV3 (
5- username : "YOUR SERVICE USERNAME" ,
6- password : "YOUR SERVICE PASSWORD" ,
5+ # username: "YOUR SERVICE USERNAME",
6+ # password: "YOUR SERVICE PASSWORD",
7+ iam_api_key : "IAM API KEY" ,
78 version : "2017-09-21"
89)
910
You can’t perform that action at this time.
0 commit comments