简体   繁体   English

如何使用和控制Watson Assistant web聊天里面的IBM碳组件?

[英]How to use and control IBM carbon components inside Watson Assistant web chat?

Currently, I am working on a chatbot using Watson assistant, and I want to ask how I can use the IBM carbon components inside the chatbot interface by using it in the dialog responses and have control over them, and also how I can make a connection between a user iframe inside the chatbot so that I can get a specific action on the dialog flow when the user interacts with the embedded iframe.目前,我正在使用 Watson 助手开发聊天机器人,我想问一下如何通过在对话响应中使用聊天机器人界面中的 IBM carbon 组件并控制它们,以及如何建立连接在聊天机器人内部的用户 iframe 之间,以便当用户与嵌入式 iframe 交互时,我可以在对话流中执行特定操作。

You can use user_defined responses ( https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-render#user_defined_responses ) to display Carbon components.您可以使用user_defined响应 ( https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-render#user_defined_responses ) 来显示 Carbon 组件。 You don't need to include the carbon CSS (web chat already includes it) just the right class names on the HTML. There is an example of doing this using React at https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=tutorials-react-portals .您不需要在 HTML 上包含碳 CSS(网络聊天已经包含它),只需包含正确的 class 名称即可。在https://web-chat.global.assistant.watson 上有一个使用 React 执行此操作的示例。 cloud.ibm.com/docs.html?to=tutorials-react-portals

For two way communication between an iframe and web chat you will also need to use a user_defined response and make use of https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage .对于 iframe 和 web 聊天之间的双向通信,您还需要使用用户定义的响应并使用user_defined ://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage This will only work with iFrame content you control.这仅适用于您控制的 iFrame 内容。 If the iFrame is controlled by a third party, you will have to make use of any APIs they provide.如果 iFrame 由第三方控制,您将不得不使用他们提供的任何 API。

暂无
暂无

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

相关问题 如何设计 Shopify 2.0 收件箱/聊天图标(在 iframe 内)? - How to style Shopify 2.0 inbox/chat icon (inside an iframe)? 有什么方法可以从bot框架代码内部访问生成的网络聊天令牌值? - Is there any way to access the generated token value for web chat from inside the bot framework code? 如何从机器人读取通过聊天控制(iframe)发送的参数值 - How to read parameter value which sent through Chat Control (iframe) from bot 是否可以通过聊天控制(iframe)发送数据? - Is it possible to send data through the Chat Control (iframe)? 基于Isp.Net的基于Asp.Net Core Chat SignalR的渲染,并在基于Asp.net Web窗体的应用程序内部调用 - Asp.Net Core Chat SignalR-based rendered inside an Iframe, and called from inside of an Asp.net Web Form based application 我们可以在 iframe 中重复使用父 window 中定义的 web 组件吗? - Can we re-use web components defined in Parent window in an iframe? 搭建一个网络实时聊天支持平台一般需要多长时间? 聘请自由职业者来做这件事是否可行? - Generally how long would it take to build a web live chat support platform? Is it feasible to hire a freelancer to do it? 如何检查iframe中的javascript聊天是否在正确的父页面中 - how can I check if a javascript chat inside an iframe is within the correct parent page 如何在designMode中使用网络字体? - How to use web fonts in designMode? 如何使用Chrome Frame ActiveX控件 - How to use Chrome Frame ActiveX control
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM