lobehub / lobe-chat

🤯 Lobe Chat - an open-source, modern-design AI chat framework. Supports Multi AI Providers( OpenAI / Claude 3 / Gemini / Ollama / Qwen / DeepSeek), Knowledge Base (file upload / knowledge management / RAG ), Multi-Modals (Vision/TTS/Plugins/Artifacts). One-click FREE deployment of your private ChatGPT/ Claude application.
https://chat-preview.lobehub.com
Other
46.67k stars 10.3k forks source link

[Question] 请问本地开发插件的具体流程 #134

Closed leeyiding closed 1 year ago

leeyiding commented 1 year ago

🧐 问题描述 | Proposed Solution

你好,我对lobe-chat的插件功能非常感兴趣,想尝试开发一个插件,于是想参照chat-plugin-search-engine先在本地复现,按照README流程

$ git clone https://github.com/lobehub/chat-plugin-search-engine.git
$ cd chat-plugin-search-engine
$ pnpm install
$ pnpm start

项目成功启动,但是无法访问 http://localhost:3400/manifest-dev.json

项目大概运行几分钟后,程序报错终止,输出内容如下

> pnpm start

> @lobehub/chat-plugin-search-engine@1.4.1 start /home/lyd/Code/chat-plugin-search-engine
> vercel dev --listen 3400

Vercel CLI 28.20.0
> Creating initial build
yarn run v1.22.19
$ father dev
info  - [16:09:44] Clean output directories
Error: Failed to detect a server running on port 41481.
Details: https://err.sh/vercel/vercel/now-static-build-failed-to-detect-a-server
Error: An unexpected error occurred!
Error: Failed to detect a server running on port 41481.
Details: https://err.sh/vercel/vercel/now-static-build-failed-to-detect-a-server
    at Object.build (/home/lyd/Code/chat-plugin-search-engine/node_modules/.pnpm/@vercel+static-build@1.3.25/node_modules/@vercel/static-build/dist/index.js:241979:27)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async processMessage (/home/lyd/Code/chat-plugin-search-engine/node_modules/.pnpm/vercel@28.20.0_@types+node@14.18.33_ts-node@10.9.1/node_modules/vercel/dist/builder-worker.js:39:18)
Error: An unexpected error occurred!
Error: Failed to detect a server running on port 41481.
Details: https://err.sh/vercel/vercel/now-static-build-failed-to-detect-a-server
    at Object.build (/home/lyd/Code/chat-plugin-search-engine/node_modules/.pnpm/@vercel+static-build@1.3.25/node_modules/@vercel/static-build/dist/index.js:241979:27)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async processMessage (/home/lyd/Code/chat-plugin-search-engine/node_modules/.pnpm/vercel@28.20.0_@types+node@14.18.33_ts-node@10.9.1/node_modules/vercel/dist/builder-worker.js:39:18)
Error: An unexpected error occurred!
Error: Failed to detect a server running on port 41481.
Details: https://err.sh/vercel/vercel/now-static-build-failed-to-detect-a-server
    at Object.build (/home/lyd/Code/chat-plugin-search-engine/node_modules/.pnpm/@vercel+static-build@1.3.25/node_modules/@vercel/static-build/dist/index.js:241979:27)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async processMessage (/home/lyd/Code/chat-plugin-search-engine/node_modules/.pnpm/vercel@28.20.0_@types+node@14.18.33_ts-node@10.9.1/node_modules/vercel/dist/builder-worker.js:39:18)
 ELIFECYCLE  Command failed with exit code 1.

请问是否还需要配合chat-plugins-gateway项目一起使用,能否给出一个详细的插件本地开发流程?

📝 补充信息 | Additional Information

No response

arvinxx commented 1 year ago

插件开发流程我们正在撰写,写好第一时间通知你~

arvinxx commented 1 year ago

@leeyiding 初版指南:https://github.com/lobehub/lobe-chat/blob/main/docs/plugin-development.zh-CN.md