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-js-demo 仓库提供了一个最小化的 Vite 应用,可用你自己的 publisher token 端到端运行。
克隆并配置
仓库提供的
PUBLISHER_TOKEN = '<your publisher token>' 是占位值。运行前请把它替换为你在 发布方后台 拿到的 token——否则 SDK 在 /init 时会返回 ad.error。你将看到什么
执行npm run dev 后,在浏览器中打开终端输出的本地 URL。Demo 会展示一个聊天界面,并预置一些用户 + 助手消息。当你发送消息时,SDK 会在后台触发 /preload,并在助手回复下方渲染广告。