Documentation Index
Fetch the complete documentation index at: https://docs.kontext.so/llms.txt
Use this file to discover all available pages before exploring further.
sdk-react-demo 仓库提供了一个最小化的 Vite + React 应用,可用你自己的 publisher token 端到端运行。
克隆并配置
仓库中提供的常量是占位值——请把
PUBLISHER_TOKEN 替换为你在 发布方后台 拿到的 token,并把 PLACEMENT_CODE 设为你账号下启用的某个广告位(通常是 inlineAd)。你将看到什么
执行npm run dev 后,在浏览器中打开终端输出的本地 URL。Demo 会展示一个聊天界面,并预置一些用户 + 助手消息。当你发送消息时,SDK 会在后台触发 /preload,并在助手回复下方渲染广告。