Skip to content

Commit 45280f5

Browse files
authored
Merge pull request #337 from watson-developer-cloud/feature-abstract-assistant
Abstract assistant
2 parents 682c8a0 + f167eaa commit 45280f5

File tree

126 files changed

+10309
-24
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+10309
-24
lines changed

Examples/ServiceExamples/Scripts/ExampleAssistant.cs

Lines changed: 708 additions & 0 deletions
Large diffs are not rendered by default.

Examples/ServiceExamples/Scripts/ExampleAssistant.cs.meta

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

Examples/ServiceExamples/Scripts/ExampleVisualRecognition.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ private IEnumerator Examples()
136136

137137
while (!_detectFacesPostTested)
138138
yield return null;
139-
139+
140140
#if DELETE_TRAINED_CLASSIFIER
141141
#region Delay
142142
Runnable.Run(Delay(_delayTime));
@@ -217,20 +217,23 @@ private void OnDetectFacesPost(FacesTopLevelMultiple multipleImages, Dictionary<
217217
_detectFacesPostTested = true;
218218
}
219219

220-
#region Delay
220+
#region Delay
221221
// Introducing a delay because of a known issue with Visual Recognition where newly created classifiers
222222
// will disappear without being deleted if a delete is attempted less than ~10 seconds after creation.
223+
#if DELETE_TRAINED_CLASSIFIER
223224
private float _delayTime = 15f;
224225
private bool _isWaitingForDelay = false;
225226

227+
226228
private IEnumerator Delay(float delayTime)
227229
{
228230
_isWaitingForDelay = true;
229231
Log.Debug("ExampleVisualRecognition.Delay()", "Delaying for {0} seconds....", delayTime);
230232
yield return new WaitForSeconds(delayTime);
231233
_isWaitingForDelay = false;
232234
}
233-
#endregion
235+
#endif
236+
#endregion
234237

235238
private void OnFail(RESTConnector.Error error, Dictionary<string, object> customData)
236239
{

Examples/ServiceExamples/ServiceExamples.unity

Lines changed: 60 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ LightmapSettings:
8888
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
8989
m_PVRFilteringAtrousPositionSigmaIndirect: 2
9090
m_PVRFilteringAtrousPositionSigmaAO: 1
91+
m_ShowResolutionOverlay: 1
9192
m_LightingDataAsset: {fileID: 0}
9293
m_UseShadowmask: 1
9394
--- !u!196 &4
@@ -150,7 +151,7 @@ Transform:
150151
m_LocalScale: {x: 1, y: 1, z: 1}
151152
m_Children: []
152153
m_Father: {fileID: 0}
153-
m_RootOrder: 11
154+
m_RootOrder: 12
154155
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
155156
--- !u!1 &473286772
156157
GameObject:
@@ -190,7 +191,7 @@ Transform:
190191
m_LocalScale: {x: 1, y: 1, z: 1}
191192
m_Children: []
192193
m_Father: {fileID: 0}
193-
m_RootOrder: 6
194+
m_RootOrder: 7
194195
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
195196
--- !u!1 &525603453
196197
GameObject:
@@ -230,7 +231,7 @@ Transform:
230231
m_LocalScale: {x: 1, y: 1, z: 1}
231232
m_Children: []
232233
m_Father: {fileID: 0}
233-
m_RootOrder: 2
234+
m_RootOrder: 3
234235
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
235236
--- !u!1 &659829311
236237
GameObject:
@@ -270,7 +271,7 @@ Transform:
270271
m_LocalScale: {x: 1, y: 1, z: 1}
271272
m_Children: []
272273
m_Father: {fileID: 0}
273-
m_RootOrder: 8
274+
m_RootOrder: 9
274275
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
275276
--- !u!1 &725710367
276277
GameObject:
@@ -343,6 +344,7 @@ Camera:
343344
m_TargetEye: 3
344345
m_HDR: 0
345346
m_AllowMSAA: 1
347+
m_AllowDynamicResolution: 0
346348
m_ForceIntoRT: 0
347349
m_OcclusionCulling: 1
348350
m_StereoConvergence: 10
@@ -358,7 +360,7 @@ Transform:
358360
m_LocalScale: {x: 1, y: 1, z: 1}
359361
m_Children: []
360362
m_Father: {fileID: 0}
361-
m_RootOrder: 15
363+
m_RootOrder: 16
362364
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
363365
--- !u!1 &748186939
364366
GameObject:
@@ -398,7 +400,7 @@ Transform:
398400
m_LocalScale: {x: 1, y: 1, z: 1}
399401
m_Children: []
400402
m_Father: {fileID: 0}
401-
m_RootOrder: 7
403+
m_RootOrder: 8
402404
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
403405
--- !u!1 &854511683
404406
GameObject:
@@ -438,7 +440,7 @@ Transform:
438440
m_LocalScale: {x: 1, y: 1, z: 1}
439441
m_Children: []
440442
m_Father: {fileID: 0}
441-
m_RootOrder: 1
443+
m_RootOrder: 2
442444
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
443445
--- !u!1 &859102722
444446
GameObject:
@@ -478,7 +480,7 @@ Transform:
478480
m_LocalScale: {x: 1, y: 1, z: 1}
479481
m_Children: []
480482
m_Father: {fileID: 0}
481-
m_RootOrder: 4
483+
m_RootOrder: 5
482484
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
483485
--- !u!1 &1053617509
484486
GameObject:
@@ -518,7 +520,7 @@ Transform:
518520
m_LocalScale: {x: 1, y: 1, z: 1}
519521
m_Children: []
520522
m_Father: {fileID: 0}
521-
m_RootOrder: 9
523+
m_RootOrder: 10
522524
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
523525
--- !u!1 &1073418922
524526
GameObject:
@@ -558,7 +560,7 @@ Transform:
558560
m_LocalScale: {x: 1, y: 1, z: 1}
559561
m_Children: []
560562
m_Father: {fileID: 0}
561-
m_RootOrder: 0
563+
m_RootOrder: 1
562564
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
563565
--- !u!1 &1160237478
564566
GameObject:
@@ -598,7 +600,7 @@ Transform:
598600
m_LocalScale: {x: 1, y: 1, z: 1}
599601
m_Children: []
600602
m_Father: {fileID: 0}
601-
m_RootOrder: 13
603+
m_RootOrder: 14
602604
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
603605
--- !u!1 &1194016994
604606
GameObject:
@@ -638,7 +640,7 @@ Transform:
638640
m_LocalScale: {x: 1, y: 1, z: 1}
639641
m_Children: []
640642
m_Father: {fileID: 0}
641-
m_RootOrder: 3
643+
m_RootOrder: 4
642644
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
643645
--- !u!1 &1310649318
644646
GameObject:
@@ -678,7 +680,7 @@ Transform:
678680
m_LocalScale: {x: 1, y: 1, z: 1}
679681
m_Children: []
680682
m_Father: {fileID: 0}
681-
m_RootOrder: 10
683+
m_RootOrder: 11
682684
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
683685
--- !u!1 &1646373635
684686
GameObject:
@@ -718,7 +720,7 @@ Transform:
718720
m_LocalScale: {x: 1, y: 1, z: 1}
719721
m_Children: []
720722
m_Father: {fileID: 0}
721-
m_RootOrder: 12
723+
m_RootOrder: 13
722724
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
723725
--- !u!1 &1713392457
724726
GameObject:
@@ -758,7 +760,7 @@ Transform:
758760
m_LocalScale: {x: 1, y: 1, z: 1}
759761
m_Children: []
760762
m_Father: {fileID: 0}
761-
m_RootOrder: 5
763+
m_RootOrder: 6
762764
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
763765
--- !u!1 &1740459831
764766
GameObject:
@@ -798,7 +800,7 @@ Transform:
798800
m_LocalScale: {x: 1, y: 1, z: 1}
799801
m_Children: []
800802
m_Father: {fileID: 0}
801-
m_RootOrder: 14
803+
m_RootOrder: 15
802804
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
803805
--- !u!1 &2041722972
804806
GameObject:
@@ -815,7 +817,7 @@ GameObject:
815817
m_Icon: {fileID: 0}
816818
m_NavMeshLayer: 0
817819
m_StaticEditorFlags: 0
818-
m_IsActive: 1
820+
m_IsActive: 0
819821
--- !u!4 &2041722973
820822
Transform:
821823
m_ObjectHideFlags: 0
@@ -827,7 +829,7 @@ Transform:
827829
m_LocalScale: {x: 1, y: 1, z: 1}
828830
m_Children: []
829831
m_Father: {fileID: 0}
830-
m_RootOrder: 16
832+
m_RootOrder: 17
831833
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
832834
--- !u!114 &2041722974
833835
MonoBehaviour:
@@ -840,3 +842,43 @@ MonoBehaviour:
840842
m_Script: {fileID: 11500000, guid: 5c93a3595292dc6479dfb6e7c721838b, type: 3}
841843
m_Name:
842844
m_EditorClassIdentifier:
845+
--- !u!1 &2118312579
846+
GameObject:
847+
m_ObjectHideFlags: 0
848+
m_PrefabParentObject: {fileID: 0}
849+
m_PrefabInternal: {fileID: 0}
850+
serializedVersion: 5
851+
m_Component:
852+
- component: {fileID: 2118312581}
853+
- component: {fileID: 2118312580}
854+
m_Layer: 0
855+
m_Name: ExampleAssistant
856+
m_TagString: Untagged
857+
m_Icon: {fileID: 0}
858+
m_NavMeshLayer: 0
859+
m_StaticEditorFlags: 0
860+
m_IsActive: 1
861+
--- !u!114 &2118312580
862+
MonoBehaviour:
863+
m_ObjectHideFlags: 0
864+
m_PrefabParentObject: {fileID: 0}
865+
m_PrefabInternal: {fileID: 0}
866+
m_GameObject: {fileID: 2118312579}
867+
m_Enabled: 1
868+
m_EditorHideFlags: 0
869+
m_Script: {fileID: 11500000, guid: 9848745df680ac7438f802aac3f4b8f2, type: 3}
870+
m_Name:
871+
m_EditorClassIdentifier:
872+
--- !u!4 &2118312581
873+
Transform:
874+
m_ObjectHideFlags: 0
875+
m_PrefabParentObject: {fileID: 0}
876+
m_PrefabInternal: {fileID: 0}
877+
m_GameObject: {fileID: 2118312579}
878+
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
879+
m_LocalPosition: {x: 0, y: 0, z: 0}
880+
m_LocalScale: {x: 1, y: 1, z: 1}
881+
m_Children: []
882+
m_Father: {fileID: 0}
883+
m_RootOrder: 0
884+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ The credentials for each service contain either a `username`, `password` and end
6161
## Watson Services
6262
To get started with the Watson Services in Unity, click on each service below to read through each of their `README.md`'s and their codes.
6363
* [Alchemy Language](/Scripts/Services/AlchemyAPI/v1) **Deprecated**
64+
* [Assistant](/Scripts/Services/Assistant/v1)
6465
* [Conversation](/Scripts/Services/Conversation/v1)
6566
* [Discovery](/Scripts/Services/Discovery/v1)
6667
* [Document Conversion](/Scripts/Services/DocumentConversion/v1) **Deprecated**

Scripts/Services/Assistant.meta

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

Scripts/Services/Assistant/v1.meta

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

0 commit comments

Comments
 (0)