Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
developer-bz opened this issue Apr 6, 2020 · 4 comments

Comments

@developer-bz
Copy link

developer-bz commented Apr 6, 2020

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

@germanattanasio
Copy link
Contributor

@mitchmason ☝️

@developer-bz
Copy link
Author

@mitchmason can you please provide your inputs?

Thanks in advance

@mitchmason
Copy link
Contributor

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.

@developer-bz
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants