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.75k stars 1.86k forks source link

[Bug] [ChatKnowledge] "Data too long for column 'meta_info' #2065

Closed leichangqing closed 1 month ago

leichangqing commented 1 month ago

Search before asking

Operating system information

Linux

Python version information

3.10

DB-GPT version

main

Related scenes

Installation Information

Device information

GPU 4090 1张

Models information

本地GLM4

What happened

MYSQL, chromdb,tugraph都跑起来时,创建知识库选知识图谱,上传官方代码自带 dbgpt.md文档时,document embedding failed(pymysql.err.DataError) (1406, "Data too long for column 'meta_info' at row 1") [SQL: INSERT INTO document_chunk (document_id, doc_name, doc_type, content, questions, meta_info, gmt_created, gmt_modified) VALUES (%(document_id)s, %(doc_name)s, %(doc_type)s, %(content)s, %(questions)s, %(meta_info)s, %(gmt_created)s, %(gmt_modified)s)] [parameters: {'document_id': 2, 'doc_name': 'dbgpt.md', 'doc_type': 'DOCUMENT', 'content': '"DB-GPT: 用私有化LLM技术定义数据库下一代交互方式-更加详细的贡献指南请参考如何贡献。": 这是一个用于数据库的复杂且创新的工具, 我们的项目也在紧急的开发当中, 会陆续发布一些新的feature。如在使用当中有任何具体问题, 优先在项目下提issue, 如有需要, 请联系如下微信,我会尽力提供帮助,同时也非常欢迎大家参与到项目建设中。', 'questions': None, 'meta_info': "{'Header1': 'DB-GPT: 用私有化LLM技术定义数据库下一代交互方式', 'Header2': '更加详细的贡献指南请参考如何贡献。', 'source': '/home/leicq/apps/DB-

What you expected to happen

应该截断,或表定义字段长度足够。

How to reproduce

创建知识库,选知识图谱类型 ,上传官网自带的 dbgpt.md文件就报错。

Additional context

No response

Are you willing to submit PR?

Aries-ckt commented 1 month ago

sorry about that, ALTER document_chunk schema and change meta_info type from varchar to text