简体   繁体   English

Watson Assistant 捕捉网页中的元素

[英]Watson Assistant to catch the elements in the webpage

I have a Watson Assistant chatbot embedded in a webpage using the Web Chat embedding integration JavaScript.我使用 Web 聊天嵌入集成 JavaScript 在网页中嵌入了一个 Watson Assistant 聊天机器人。

I need to make the embedded chatbot catch the login information from the webpage the chatbot is embedded in. Like, making the chatbot starts with "Hi Adam" based on that Adam is already logged into the webpage.我需要让嵌入式聊天机器人从嵌入聊天机器人的网页中捕获登录信息。比如,基于 Adam 已经登录到网页,使聊天机器人以“Hi Adam”开头。 Or, even how to make the chatbot catch different elements in the page it's embedded into.或者,甚至如何让聊天机器人在它嵌入的页面中捕捉不同的元素。

Any advice is appreciated..任何建议表示赞赏..

Thanks..谢谢..

You will need to extend the IBM Web Chat client, to capture the login info, and then pass this info back into the Watson Assistant payload.您需要扩展 IBM Web 聊天客户端,以捕获登录信息,然后将此信息传递回 Watson Assistant 有效负载。 I would suggest adding the info to the context, so that it can easily be used in your answers as you have commented about.我建议将信息添加到上下文中,以便可以轻松地在您评论的答案中使用它。 This will mean extra JS coding.这将意味着额外的 JS 编码。 There is more info in the Watson doc's about extending the Web chat bot or on the IBM Github . Watson 文档中有更多关于扩展 Web 聊天机器人IBM Github 的信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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