{"repo":"wuyangwang/my-chat-web","free":true,"listed":false,"github":"https://github.com/wuyangwang/my-chat-web","clone":"git clone https://github.com/wuyangwang/my-chat-web.git","description":"简单的ai chat网站，使用Cloudflare AI提供服务，Nextjs开发，由Cloudflare pages部署 A simple AI chat site that serviced by Cloudflare AI and deployed by Nextjs+ Cloudflare Pages","language":"JavaScript","stars":56,"topics":["ai","chatbot","cloudflare-pages","nextjs","shadcn-ui","deepseek"],"license":"MIT","category":"ui-components","readme_excerpt":"AI 聊天 基于 nextjs + cloudflare pages 部署 + cloudflare workers ai 提供聊天 api - UI 使用 nextjs + tailwindcss + shadcn-ui - 使用 cloudflare 提供的 workers ai 功能 - 参考/app/api 目录 体验地址：https://chat.handybox.top 主要模型 /app/api/utils/models.js - 聊天 - @cf/qwen/qwen1.5-14b-chat-awq - @cf/meta/llama-3.3-70b-instruct-fp8-fast - 图片生成 @cf/stabilityai/stable-diffusion-xl-base-1.0 - 翻译 @cf/meta/m2m100-1.2b 外部模型使用 目前兼容了以下模型 需要自己提供 api key 使用 具体见 /utils/models.js - DeepSeek - Gemini - Grok - OpenAI - Ollama 本地 参考文档 - https://developers.cloudflare.com/pages/framework-guides/nextjs/ssr/ - https://developers.cloudflare.com/workers-ai/models/ 参考 UI 样式 - https://github.com/jakobhoeg/shadcn-chat - https://github.com/bundui/components - https://github.com/Edil-ozi/edil-ozi - https://github.com/nikhils4/ui-beats - https://github.com/baiwumm/next-daily-hot 开发 本地开发调试接口时， - 可以设置.env 文件 NEXT PUBLIC MOCK API='true' 来启用 mock 数据，不调用正式接口。 - 或者使用本地 Ollama 模型或者使用 Grok 等自己有 api key 的模型。 部署 仅支持部署到 cloudflare 通过 cf 提供的 cli 部署 - 仓库下载到本地 安装依赖 pnpm i - 更改 wrangler.toml 里的 name 为你想要的名字 - 执行 pnpm run deploy 部署正式环境 - 执行 pnpm run deploy:dev 部署到 Cloudflare Pages 的 dev 预览分支环境 - 看终端提示 第一次需要登录 - 完成 可以到 cf dashboard 里查看 说明： - Cloudflare Pages 的 dev/preview 部署走分支环境，不是 wrangler.toml 里的命名 env - deploy:dev 会发布到 dev branch 对应的 preview deployment 说明 - 使用 Cloudflare Pages 部署，每天免费 100000 次请求 - 聊天请求接口时默认携带 4 条历史记录作为上下文(图片生成和翻译不携带) - 本地存储 - 聊天最大保存 500 条历史记录 - 图片最大保存 100 张 - 翻译最大保存 500 条 - 目前都是本地 localstorage 存储 - 本地开发时无法调用真实的接口如/api/chat，可以使用 ollam","default_branch":null,"files":null,"tree":[],"storefront":"/r/wuyangwang","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/wuyangwang/my-chat-web/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}