AiBot 开发指南
📦 项目概述
AiBot AI助手 一款多平台 AI 生产力工具。
页面集成
- 如你是非技术人员,可让负责技术的开发人员帮忙粘贴并更新页面。
使用 iframe 集成
HTML
<iframe src="https://app.dreamai.exmay.com/app/{apiKey}/${shareId}" height="100%" width="100%"></iframe>封装为 Vue 通用组件
- /components/Aibot.vue
Vue
<template>
<iframe src="https://app.dreamai.exmay.com/app/{apiKey}/${shareId}" height="100%" width="100%"></iframe>
</template>- 其他 Vue 页面 引用
TypeScript
<script lang="ts" setup>
import Aibot from '@/components/Aibot.vue';
</script>Vue
<template>
<Aibot />
</template>使用 JavaScript SDK 集成
将 AI助手 应用嵌入到你的前端页面
准备好的 AI助手 嵌入到你的网页中。使用 script 标签方式, 将 script 代码复制到你网站 <head> 或 <body> 标签中。
JavaScript
<script>
window.aibot = {
token: 'xxx',
baseUrl: 'https://app.dreamai.exmay.com/app'
}
</script>
<script src="https://app.dreamai.exmay.com/app/aibot-jssdk-1.0.0.min.js" id="xxx" defer></script>🙌 贡献指南
欢迎通过 Pull Request 贡献代码,需满足:
- 代码风格与项目一致
- 通过现有测试用例
- 补充相关文档更新