番摊机器人 由 yxybox 发布的 Vite 8.3 + Vue 3 + DeepSeek-V4.1-Flash 网页版 AI 模板
作者:admin | 分类:番摊机器人 | 浏览:1 | 日期:2026年09月28日找到了!这是一个由 yxybox 发布的 Vite 8.3 + Vue 3 + DeepSeek-V4.1-Flash 网页版 AI 模板。
---
技术栈总览
| 层面 | 技术 | 版本 |
|:----:|:----:|:----:|
| 构建工具 | Vite | ^8.3.0 |
| 前端框架 | Vue | ^3.5.42 |
| 路由 | Vue Router | ^5.3.1 |
| 组件库 | Arco Design(字节出品) | ^2.58.0 |
| 状态管理 | Pinia | ^4.0.3 |
| 本地持久化 | pinia-plugin-persistedstate | ^4.7.1 |
| 大模型 | DeepSeek-V4.1-Flash + OpenAI 兼容 API | — |
| Markdown | markdown-it | — |
| 代码高亮 | highlight.js | ^11.12.0 |
| 公式渲染 | @mdit/plugin-katex | ^1.1.1 |
---
功能特性
✅ 暗黑 + 亮色主题切换
✅ 流式打字输出(打字机效果)
✅ 深度思考模式(thinking: enabled)
✅ 代码高亮 / 复制 / 下载
✅ KaTeX 数学公式渲染
✅ Mermaid 图表(拖拽、缩放、下载)
✅ 多轮对话 / 本地存储
✅ 链接跳转、图片预览
---
如何运行
1. 申请 DeepSeek API Key → platform.deepseek.com
2. 配置 .env 文件:
VITEAPPTITLE = 'Vue3-Web-DeepSeek'
VITE_PORT = 3001
VITE_OPEN = true
VITEDEEPSEEKAPI_KEY = 你的API Key
VITEDEEPSEEKBASE_URL = https://api.deepseek.com
3. 运行:
npm install
npm run dev
---
模型调用核心代码
const completion = await openai.chat.completions.create({
messages: [...], // 对话历史
model: 'deepseek-flash', // DeepSeek-V4.1-Flash
thinking: {'type': chatState.thinkingEnabled ? 'enabled' : 'disabled'},
stream: true, // 流式输出
})
---
哪里获取
博客园原文:cnblogs.com/yxybox/p/23141304[citation:web:49.6]
B站会员购有售(¥1050,商业授权版)[citation:web:49.7]
---
另外,同作者还有 H5 版本(Vite 8.3 + Vue 3 + Vant 4)的 DeepSeek-V4.1-Flash 模板[citation:web:49.11],如果做移动端可以用那个。