今天下载了DB-GPT,照着官方文档通过源码安装,在执行pip install -e ".[default]"
时就开始报错了:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
Obtaining file:///Users/alan/Desktop/DB-GPT Installing build dependencies ... done Checking if build backend supports build_editable ... done Getting requirements to build editable ... error error: subprocess-exited-with-error × Getting requirements to build editable did not run successfully. │ exit code: 1 ╰─> [14 lines of output] error: Multiple top-level packages discovered in a flat-layout: ['web', 'i18n', 'pilot', 'docker', 'assets', 'configs', 'packages']. To avoid accidental inclusion of unwanted files or directories, setuptools will not proceed with this build. If you are trying to create a single distribution with multiple packages on purpose, you should not rely on automatic discovery. Instead, consider the following options: 1. set up custom discovery (`find` directive with `include` or `exclude`) 2. use a `src-layout` 3. explicitly set `py_modules` or `packages` with a list of names To find more information, look for "package discovery" on setuptools docs. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × Getting requirements to build editable did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. |
后来发现是其GitHub master分支并不完整,可用版本最好是看英文文档上方显示的版本号,比如我当前是v0.6.1,所以执行git checkout v0.6.1
再照着文档就可以成功启动了。
Ollama配置
官方文档并没说明如何配置连接本地的Ollama,通过简单搜索得知在.env
文件添加如下配置即可:
1 2 3 4 5 6 7 8 |
LLM_MODEL=ollama_proxyllm MODEL_SERVER=http://127.0.0.1:11434 PROXY_SERVER_URL=http://127.0.0.1:11434 PROXYLLM_BACKEND=qwen2.5:14b PROXY_API_KEY=not_used EMBEDDING_MODEL=proxy_ollama proxy_ollama_proxy_server_url=http://127.0.0.1:11434 proxy_ollama_proxy_backend=nomic-embed-text:latest |
模型和地址视你自己的情况修改哦。
整体感受:跑一跑感受下此类项目的效果还是可以的,生态没发现有什么优势,对构建类似系统的人有很多可以参考的地方,但整体而言疑似KPI项目,代码虽然很多,但相当一部分明显是来自SQLAlchemy、Pydantic和Langchain,未深入对比暂不确定其修改幅度和也未评估必要性。
仅个人感受,勿喷!