简体   繁体   中英

IBM's Watson Assistant has stopped responding

Just over a year ago I created a chatbot using IBM Watson Assistant. It is successfully interfacing with wordpress and facebook. it was working perfectly well in a web page too, but has now stopped outputting any text. I created the website integration by copying the code shown in the "preview link" page created by IBM when the bot is under development. That code includes a library file called "chat.0.0.4.js" and corresponding css. When the code runs now, the chatbot renders correctly, but when I look at the browser console I see at line 12990 in chat.0.0.4.js:

400 - {"error":"Invalid Request Body","errors":[{"message":"When source.type is not 'watson', source.id is required

Does anyone know how to fix this? I see that the integration code from the "preview link" is now totally different and I wonder if the mechanism I used a year ago is now depreciated?

Thanks.

I think you need to use the newer version, the script to integrate WA has changed and now looks like this:

 <script> window.watsonAssistantChatOptions = { integrationID: 'YOUR_INTEGRATION_ID', region: 'YOUR_REGION', serviceInstanceID: 'YOUR_SERVICE_INSTANCE', onLoad: function(instance) { instance.updateUserID(L12345); instance.render(); } }; setTimeout(function(){ const t=document.createElement('script'); t.src="https://web-chat.global.assistant.watson.appdomain.cloud/loadWatsonAssistantChat.js"; document.head.appendChild(t); }); </script>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM