Search code examples
c#unity-game-engineibm-watsonwatson-conversation

ExampleAssistantV1 with IBM Watson Unity SDK


I have attached the ExampleAssistantV1.cs script to a character in Unity and obtained my services credentials (API key and service URL) from the Assistant I have created.

  • From my dialog page, I can only see/get my Assistant Name and Assistant ID, but nothing like Workspace ID. I have searched around my bluemix pages and account details for the Assistant service, but cannot seem to find anything about Workspace. Where is this?
  • The version date when I used Tone Analyzer in Unity worked with the current date (yesterday) so I wonder if the same applies to Assistant? In the code comments, there is no explanation of what this date actually is...
  • When I run Unity, I get the following error. I could only find two threads on this; both are closed now on GitHub. Could someone please help me understand what I am missing?

    [RESTConnector.ProcessRequestQueue()][ERROR] URL: https://gateway-lon.watsonplatform.net/assistant/api/v1/workspaces//message?version=2018-12-27, ErrorCode: 400, Error: 400 Bad Request, Response: {"error":"URL workspaceid parameter 'message' is not a valid GUID.","code":400}

After running in Unity, when I look at my service page, I see a new instance created with a unity-sdk-example-workspace-deleteUpdated message. How did I cause this? Have I done something wrong that this appears new?

enter image description here


Solution

  • If you click the three dots in the image above next to conversation assistant you can click View API Details. You should be able to see your Workspace ID there.

    You supply the version date to select the version of the service you want to use in your application. You will be using the last service release on or before the version date supplied. If you use today's date you will be using the latest release of the service.

    The issue with the the call is there is no workspaceId supplied. Ideally there should be a null check for this param. I've created an issue for this: https://github.com/watson-developer-cloud/unity-sdk/issues/490

    As for the unity-sdk-example-workspace-deleteUpdated it look like you ran the AssistantV1 example. The example runs through each operation in the service and attempts to invoke it. In this case it looks like it failed to delete the workspace or the example was stopped before it was deleted. It is safe to delete this workspace/skill.