1.源码安装
- 版本:0.5.7
- python版本:3.10.12
- llm api: yi model
https://github.com/eosphoros-ai/DB-GPT
官方文档:
DB-GPT · 语雀
- git:(main) ✗ git clone https://github.com/eosphoros-ai/DB-GPT.git
复制代码
2.复制设置文件
修改设置文件:
我这里用的yi api
- # 修改下面代码
- LLM_MODEL=yi_proxyllm
- ## Yi Proxyllm, https://platform.lingyiwanwu.com/docs
- YI_MODEL_VERSION=yi-34b-chat-0205
- YI_API_BASE=https://api.lingyiwanwu.com/v1
- YI_API_KEY=替换你的KEY
复制代码 3. 拉取模型
- (venv) ➜ DB-GPT git:(main) ✗ mkdir models & cd models
- (venv) ➜ models git:(main) ✗ git clone https://huggingface.co/GanymedeNil/text2vec-large-chinese
- (venv) ➜ models git:(main) ✗ du -d 1 -BM
- 6167M ./text2vec-large-chinese
- 6167M .
- (venv) ➜ models git:(main) ✗
复制代码 假如被屏蔽,用国内镜像下载:
https://hf-mirror.com/
4.安装依赖包
- (venv) ➜ models git:(main) ✗ pip install -e ".[openai]"
复制代码 5.当地脚本启动
- (venv) ➜ DB-GPT git:(main) ✗ python dbgpt/app/dbgpt_server.py
- =========================== WebServerParameters ===========================
- host: 0.0.0.0
- port: 5670
- daemon: False
- controller_addr: None
- model_name: yi_proxyllm
- share: False
- remote_embedding: False
- remote_rerank: False
- log_level: INFO
- light: False
- log_file: dbgpt_webserver.log
- tracer_file: dbgpt_webserver_tracer.jsonl
- tracer_storage_cls: None
- disable_alembic_upgrade: False
- awel_dirs: None
- default_thread_pool_size: None
- ======================================================================
- , llm client class: <class 'dbgpt.model.proxy.llms.yi.YiLLMClient'>
- INFO: 127.0.0.1:40706 - "POST /api/controller/models HTTP/1.1" 200 OK
- INFO: 127.0.0.1:40720 - "POST /api/controller/models HTTP/1.1" 200 OK
- begin run _add_app_startup_event
- 2024-06-04 21:04:07 nile dbgpt.datasource.manages.connect_config_db[2963527] INFO Result: <sqlalchemy.engine.cursor.CursorResult object at 0x7ef92c111660>
- /home/nile/data2/agents_wk/DB-GPT/venv/lib/python3.10/site-packages/pydantic/_internal/_fields.py:160: UserWarning: Field "model_name" has conflict with protected namespace "model_".
- You may be able to resolve this warning by setting `model_config['protected_namespaces'] = ()`.
- warnings.warn(
- 2024-06-04 21:04:08 nile dbgpt.storage.vector_store.connector[2963527] INFO VectorStore:<class 'dbgpt.storage.vector_store.chroma_store.ChromaStore'>
- 2024-06-04 21:04:08 nile chromadb.api.segment[2963527] INFO Collection langchain is not created.
- 2024-06-04 21:04:08 nile dbgpt.storage.vector_store.chroma_store[2963527] INFO Check persist_dir: /home/nile/data2/agents_wk/DB-GPT/pilot/data/rag_flow_profile.vectordb
- 2024-06-04 21:04:08 nile dbgpt.rag.summary.db_summary_client[2963527] INFO Vector store name rag_flow_profile exist
- 2024-06-04 21:04:08 nile dbgpt.rag.summary.db_summary_client[2963527] INFO initialize db summary profile success...
- 2024-06-04 21:04:08 nile dbgpt.rag.summary.db_summary_client[2963527] INFO db summary embedding success
复制代码 6.web
7.测试数据下载
链接: https://pan.baidu.com/s/1ZILia9paCRd_HN7zk8s1xQ?pwd=2cki
提取码: 2cki
8.导入数据到mysql
9.分析数据
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。 |