Skip to content

Commit 31fd453

Browse files
committed
added credentials for conversation, conversation message api, added license to service examples, setup conversation example scene
1 parent 6033052 commit 31fd453

File tree

12 files changed

+286
-84
lines changed

12 files changed

+286
-84
lines changed

Config.json.enc

256 Bytes
Binary file not shown.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/**
2+
* Copyright 2015 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
using UnityEngine;
19+
using System.Collections;
20+
using IBM.Watson.DeveloperCloud.Services.Conversation.v1;
21+
22+
public class ExampleConversation : MonoBehaviour {
23+
private Conversation m_Conversation = new Conversation();
24+
private string m_WorkspaceID = "car_demo_1";
25+
private string m_Input = "Can you unlock the door?";
26+
27+
void Start () {
28+
Debug.Log("User: " + m_Input);
29+
m_Conversation.Message(m_WorkspaceID, m_Input, HandleOnMessage);
30+
}
31+
32+
void HandleOnMessage (DataModels.MessageResponse resp)
33+
{
34+
Debug.Log("Watson: " + resp);
35+
}
36+
}

Examples/ServiceExamples/Scripts/ExampleConversation.cs.meta

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Examples/ServiceExamples/Scripts/ExampleDIalog.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
using UnityEngine;
1+
/**
2+
* Copyright 2015 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
using UnityEngine;
219
using IBM.Watson.DeveloperCloud.Services.Dialog.v1;
320

421
public class ExampleDIalog : MonoBehaviour

Examples/ServiceExamples/Scripts/ExampleLanguageTranslation.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
using UnityEngine;
1+
/**
2+
* Copyright 2015 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
using UnityEngine;
219
using IBM.Watson.DeveloperCloud.Services.LanguageTranslation.v1;
320

421
public class ExampleLanguageTranslation : MonoBehaviour {

Examples/ServiceExamples/Scripts/ExampleNaturalLanguageClassifier.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
using UnityEngine;
1+
/**
2+
* Copyright 2015 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
using UnityEngine;
219
using IBM.Watson.DeveloperCloud.Services.NaturalLanguageClassifier.v1;
320

421
public class ExampleNaturalLanguageClassifier : MonoBehaviour

Examples/ServiceExamples/Scripts/ExampleSpeechToText.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
using UnityEngine;
1+
/**
2+
* Copyright 2015 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
using UnityEngine;
219
using IBM.Watson.DeveloperCloud.Services.SpeechToText.v1;
320

421
public class ExampleSpeechToText : MonoBehaviour

Examples/ServiceExamples/Scripts/ExampleTextToSpeech.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
using UnityEngine;
1+
/**
2+
* Copyright 2015 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
using UnityEngine;
219
using IBM.Watson.DeveloperCloud.Services.TextToSpeech.v1;
320

421
public class ExampleTextToSpeech : MonoBehaviour

Examples/ServiceExamples/ServiceExamples.unity

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,45 @@ Transform:
210210
m_Children: []
211211
m_Father: {fileID: 0}
212212
m_RootOrder: 5
213+
--- !u!1 &859102722
214+
GameObject:
215+
m_ObjectHideFlags: 0
216+
m_PrefabParentObject: {fileID: 0}
217+
m_PrefabInternal: {fileID: 0}
218+
serializedVersion: 4
219+
m_Component:
220+
- 4: {fileID: 859102724}
221+
- 114: {fileID: 859102723}
222+
m_Layer: 0
223+
m_Name: ExampleConversation
224+
m_TagString: Untagged
225+
m_Icon: {fileID: 0}
226+
m_NavMeshLayer: 0
227+
m_StaticEditorFlags: 0
228+
m_IsActive: 1
229+
--- !u!114 &859102723
230+
MonoBehaviour:
231+
m_ObjectHideFlags: 0
232+
m_PrefabParentObject: {fileID: 0}
233+
m_PrefabInternal: {fileID: 0}
234+
m_GameObject: {fileID: 859102722}
235+
m_Enabled: 1
236+
m_EditorHideFlags: 0
237+
m_Script: {fileID: 11500000, guid: db0d0fc567bc64a34a5c3e405a733f6b, type: 3}
238+
m_Name:
239+
m_EditorClassIdentifier:
240+
--- !u!4 &859102724
241+
Transform:
242+
m_ObjectHideFlags: 0
243+
m_PrefabParentObject: {fileID: 0}
244+
m_PrefabInternal: {fileID: 0}
245+
m_GameObject: {fileID: 859102722}
246+
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
247+
m_LocalPosition: {x: 0, y: 0, z: 0}
248+
m_LocalScale: {x: 1, y: 1, z: 1}
249+
m_Children: []
250+
m_Father: {fileID: 0}
251+
m_RootOrder: 6
213252
--- !u!1 &1160237478
214253
GameObject:
215254
m_ObjectHideFlags: 0
@@ -225,7 +264,7 @@ GameObject:
225264
m_Icon: {fileID: 0}
226265
m_NavMeshLayer: 0
227266
m_StaticEditorFlags: 0
228-
m_IsActive: 1
267+
m_IsActive: 0
229268
--- !u!114 &1160237479
230269
MonoBehaviour:
231270
m_ObjectHideFlags: 0

0 commit comments

Comments
 (0)