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.26k stars 1.76k forks source link

[Bug] [Vector DB] connect vector store failed: Can't instantiate abstract class MilvusStore with abstract method truncate #1995

Open LeonShaw0725 opened 1 week ago

LeonShaw0725 commented 1 week ago

Search before asking

Operating system information

Linux

Python version information

=3.11

DB-GPT version

main

Related scenes

Installation Information

Device information

CPU ECS, DB-GPT running under Proxy model

Models information

LLM:Yi-34B on OpenAIAPI EMBEDDING:text2vec-large-chinese on OpenAIAPI

What happened

1、Setting remote Milvus Service as Vector DB,when starting the project, display error: ERROR connect vector store failed: Can't instantiate abstract class MilvusStore with abstract method truncate 2024-09-10 14:12:25 NoteBook.local dbgpt.rag.summary.db_summary_client[4741] WARNING socal_base_data, mysql summary error!Can't instantiate abstract class MilvusStore with abstract method truncate, detail: Traceback (most recent call last): File "/XX/LLM/dbgpt/DB-GPT/dbgpt/rag/summary/db_summary_client.py", line 75, in init_db_summary self.db_summary_embedding(item["db_name"], item["db_type"]) File "/XX/LLM/dbgpt/DB-GPT/dbgpt/rag/summary/db_summary_client.py", line 45, in db_summary_embedding self.init_db_profile(db_summary_client, dbname) File "/XX/LLM/dbgpt/DB-GPT/dbgpt/rag/summary/db_summary_client.py", line 95, in init_db_profile vector_connector = VectorStoreConnector.from_default( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/XX/LLM/dbgpt/DB-GPT/dbgpt/serve/rag/connector.py", line 153, in from_default return cls(real_vector_store_type, vector_store_config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/XX/Documents/LLM/dbgpt/DB-GPT/dbgpt/serve/rag/connector.py", line 128, in init raise e File "/Users/shaozhijing/Documents/LLM/dbgpt/DB-GPT/dbgpt/serve/rag/connector.py", line 124, in init client = self.connector_class(config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: Can't instantiate abstract class MilvusStore with abstract method truncate

Milvus vector db config

VECTOR_STORE_TYPE=Milvus MILVUS_URL=127.0.0.1 MILVUS_PORT=19530 MILVUS_USERNAME= MILVUS_PASSWORD= MILVUS_SECURE=

2、on uploading docs to Knowledge database,errors displayed blew

document add error (pymysql.err.IntegrityError) (1048, "Column 'doc_token' cannot be null") [SQL: INSERT INTO knowledge_document (doc_name, doc_type, doc_token, space, chunk_size, status, last_sync, content, result, vector_ids, summary, gmt_created, gmt_modified, questions) VALUES (%(doc_name)s, %(doc_type)s, %(doc_token)s, %(space)s, %(chunk_size)s, %(status)s, %(last_sync)s, %(content)s, %(result)s, %(vector_ids)s, %(summary)s, %(gmt_created)s, %(gmt_modified)s, %(questions)s)] [parameters: {'doc_name': 'XXX.pdf', 'doc_type': 'DOCUMENT', 'doc_token': None, 'space': 'db1', 'chunk_size': 0.0, 'status': 'TODO', 'last_sync': datetime.datetime(2024, 9, 10, 14, 53, 57, 799748), 'content': '/LLM/dbgpt/DB-GPT/pilot/data/db1/XXX.pdf', 'result': '', 'vector_ids': None, 'summary': '', 'gmt_created': datetime.datetime(2024, 9, 10, 14, 53, 57, 799927), 'gmt_modified': datetime.datetime(2024, 9, 10, 14, 53, 57, 799931), 'questions': None}] (Background on this error at: https://sqlalche.me/e/20/gkpj)

What you expected to happen

1、EMBEDDING db schema correct 2、RAG with Milvus running correct

How to reproduce

1、setting Milvus as Vector in .env 2、setting MySQL DB as datasouce of chatdata 3、restart project

Additional context

No response

Are you willing to submit PR?

Aries-ckt commented 1 week ago

hi, pull the latest main branch