eosphoros-ai / DB-GPT

AI Native Data App Development framework with AWEL(Agentic Workflow Expression Language) and Agents
http://docs.dbgpt.cn
MIT License
13.24k stars 1.75k forks source link

[Bug]windows can't read the Milvus url config #1785

Open shaoqing404 opened 1 month ago

shaoqing404 commented 1 month ago

Search before asking

Operating system information

Windows

Python version information

=3.11

DB-GPT version

latest release

Related scenes

Installation Information

Device information

7754HX 笔记本版本cpu 4070 笔记本版本

Models information

deepseek+glm-4-0520+bge_embedding

What happened

VECTOR_STORE_TYPE=Chroma 后,window 不读取配置文件中的 MILVIS、TuGrah配置。当前版本似乎将VECTOR_STORE_TYPE和Graph定义成唯一组件,但在实际应用中会依赖同一个目的下的不同组件。 配置文件如下,已经完成了隐私控制:

`VECTOR_STORE_TYPE=Chroma GRAPH_STORE_TYPE=TuGraph

Chroma vector db config

CHROMA_PERSIST_PATH=/root/DB-GPT/pilot/data

Milvus vector db config

VECTOR_STORE_TYPE=Milvus

MILVUS_URL=10.108.. MILVUS_PORT=19530 MILVUS_USERNAME=wintelia MILVUS_PASSWORD=wintelia2024 MILVUS_SECURE=False

Weaviate vector db config

VECTOR_STORE_TYPE=Weaviate

WEAVIATE_URL=https://kt-region-m8hcy0wc.weaviate.network

## ElasticSearch vector db config

VECTOR_STORE_TYPE=ElasticSearch

ElasticSearch_URL=10.108.. ElasticSearch_PORT=9200 ElasticSearch_USERNAME EicSearchlast_PASSWORD

TuGraph config

TUGRAPH_HOST=10.108.4.1 TUGRAPH_PORT=33314 TUGRAPH_USERNAME=admin TUGRAPH_PASSWORD=73@TuGraph TUGRAPH_VERTEX_TYPE=entity TUGRAPH_EDGE_TYPE=relation TUGRAPH_EDGE_NAME_KEY=label

***

WebServer Language Support

***

en, zh, fr, ja, ko, ru

LANGUAGE=en

LANGUAGE=zh`

What you expected to happen

dbgpt.storage.vector_store.milvus_store中 class MilvusStore 在被上层调用了采用了默认的 MilvusVectorConfig 配置(当VECTOR_STORE_TYPE 被指向非Milvus时)。这导致配置文件在期望使用多个 VECTOR_STORE 时出现错误。

在该版本中,同样的情况出现在Graphrag上,由于对.env配置文件读取的异常,同时采用同类型多个服务组件变得困难。

期望官方调整.env的读取方式,对于proxy_llm 以列表方式读取,运行在online的llm下初始化时运行多个模型,载入多个不同组件的Vector_store和graph作为备选。

我正在将Graphrag作为服务整合进入dbgpt,但由于配置读取上设计思路的复杂化导致直接嵌入几乎不可取。

How to reproduce

windows 11 下配置 ### TuGraph config #VECTOR_STORE_TYPE=ElasticSearch ### Weaviate vector db config 和#VECTOR_STORE_TYPE=Milvus 即可复现

Additional context

No response

Are you willing to submit PR?

shaoqing404 commented 1 month ago

一个临时的解决方案能够让配置生效: 修改dbgpt.storage.vector_store.milvus_store.MilvusStore 中(大约在164行)所有关于milvus的配置判断,先判断os.getenv下的配置信息,再从 milvus_vector_config = vector_store_config.to_dict() 中读取。

在测试中,大多数情况下milvus组件的配置都默认指向了localhost,这是不对的。

Aries-ckt commented 1 month ago

@shaoqing404, sorry about that, we will update milvus url config localhost

github-actions[bot] commented 5 days ago

This issue has been marked as stale, because it has been over 30 days without any activity.