assistant-simple icon indicating copy to clipboard operation
assistant-simple copied to clipboard

Accessing the state property of system object in the skills object of context variable in ibm watson assistant v2 api

Open developer-bz opened this issue 5 years ago • 4 comments

This is not an issue, rather something informative. I could read from the ibm watson assistant v2 api documentation that there is a state property which provides information about the current conversation state. It also says that it is an encoded string. Is there any way i can decode this string and get the information on the current conversation state? If yes, please provide the steps to decode it.

Below is the format of the json object where state property is present,

context: {
  skills: {
    ['main skill']: {
        user_defined: {},
        system: {
          state: "eyJzZXNzaW9uX2lkIjoiNGNlMTlksomerandomstringBmLTlhZWMtNTBjYjcxM2I4YjkzIiwic2tpbGxfcmVmZXJlbmNlIjoibWFpbiBza2lsbCI...................................................."
        }
      }
    }
  }

Also find the link to the documentation, https://cloud.ibm.com/apidocs/assistant/assistant-v2#send-user-input-to-assistant

Thanks in advance

developer-bz avatar Apr 06 '20 08:04 developer-bz

@mitchmason ☝️

germanattanasio avatar Apr 07 '20 20:04 germanattanasio

@mitchmason can you please provide your inputs?

Thanks in advance

developer-bz avatar Apr 09 '20 12:04 developer-bz

Setting debug:true in the options object should return all the info you want. At this time you cannot pro-actively edit the state object you are seeing there to manipulate it, but you can get the same info via debug:true. Editing the state in v2 api is on the roadmap. If you absolutely need to edit the state then I'd suggest using v1 in the meantime.

mitchmason avatar Apr 20 '20 14:04 mitchmason

Thanks @mitchmason @germanattanasio . I already have debug set to true in the options object. But it isn't giving me the information related to digressions. Can you tell me the way to get information on digressions? Like v1 api has digressed:true in the system context variable. Getting atleast digressed:true would be of great help with v2 api.

developer-bz avatar Apr 21 '20 17:04 developer-bz