Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] connect vector store failed: Query execution failed: {code: CypherException} #2019

Open
4 of 15 tasks
AppleJunJiang opened this issue Sep 14, 2024 · 6 comments
Open
4 of 15 tasks
Labels
bug Something isn't working Waiting for reply

Comments

@AppleJunJiang
Copy link

Search before asking

  • I had searched in the issues and found no similar issues.

Operating system information

Linux

Python version information

=3.11

DB-GPT version

main

Related scenes

  • Chat Data
  • Chat Excel
  • Chat DB
  • Chat Knowledge
  • Model Management
  • Dashboard
  • Plugins

Installation Information

Device information

GPU GTX 3060

Models information

Qwen-72B

What happened

2024-09-14 14:44:14 2024-09-14 06:44:14 7ba7ee03bbb8 dbgpt.app.knowledge.api[1] INFO Received params: 知识图谱测试, doc_ids=[1] model_name=None pre_separator=None separators=None chunk_size=None chunk_overlap=None
2024-09-14 14:44:15 /usr/local/lib/python3.10/dist-packages/pydantic/_internal/fields.py:132: UserWarning: Field "model_name" in BuiltinKnowledgeGraphConfig has conflict with protected namespace "model".
2024-09-14 14:44:15
2024-09-14 14:44:15 You may be able to resolve this warning by setting model_config['protected_namespaces'] = ().
2024-09-14 14:44:15 warnings.warn(
2024-09-14 14:44:15 /usr/local/lib/python3.10/dist-packages/pydantic/_internal/fields.py:132: UserWarning: Field "model_name" in CommunitySummaryKnowledgeGraphConfig has conflict with protected namespace "model".
2024-09-14 14:44:15
2024-09-14 14:44:15 You may be able to resolve this warning by setting model_config['protected_namespaces'] = ().
2024-09-14 14:44:15 warnings.warn(
2024-09-14 14:44:15 2024-09-14 06:44:15 7ba7ee03bbb8 dbgpt.serve.rag.connector[1] INFO VectorStore:<class 'dbgpt.storage.knowledge_graph.community_summary.CommunitySummaryKnowledgeGraph'>
2024-09-14 14:44:15 2024-09-14 06:44:15 7ba7ee03bbb8 dbgpt.storage.graph_store.factory[1] ERROR create graph store failed: Query execution failed: {code: CypherException} {message: CypherException: visit(...) failed at src/cypher/arithmetic/ast_expr_evaluator.cpp:480}
2024-09-14 14:44:15 2024-09-14 06:44:15 7ba7ee03bbb8 dbgpt.serve.rag.connector[1] ERROR connect vector store failed: Query execution failed: {code: CypherException} {message: CypherException: visit(...) failed at src/cypher/arithmetic/ast_expr_evaluator.cpp:480}

What you expected to happen

正常创建知识库,并正常同步

How to reproduce

在创建知识库的时候,没有create知识库,就进行了连接导致出错。
TuGraph 正常启动
以下是.env配置:

##
#** VECTOR STORE / KNOWLEDGE GRAPH SETTINGS **#
#
#
VECTOR_STORE_TYPE=Chroma
GRAPH_STORE_TYPE=TuGraph
GRAPH_COMMUNITY_SUMMARY_ENABLED=True
KNOWLEDGE_GRAPH_EXTRACT_SEARCH_TOP_SIZE=5
KNOWLEDGE_GRAPH_EXTRACT_SEARCH_RECALL_SCORE=0.3
KNOWLEDGE_GRAPH_COMMUNITY_SEARCH_TOP_SIZE=20
KNOWLEDGE_GRAPH_COMMUNITY_SEARCH_RECALL_SCORE=0.0

Chroma vector db config

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

TuGraph config

TUGRAPH_HOST=192.168.1.102
TUGRAPH_PORT=7687
TUGRAPH_USERNAME=admin
TUGRAPH_PASSWORD=73@TuGraph
TUGRAPH_VERTEX_TYPE=entity
TUGRAPH_EDGE_TYPE=relation
TUGRAPH_PLUGIN_NAMES=leiden

#开启图社区总结能力
GRAPH_COMMUNITY_SUMMARY_ENABLED=True

Additional context

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@AppleJunJiang AppleJunJiang added bug Something isn't working Waiting for reply labels Sep 14, 2024
@AppleJunJiang
Copy link
Author

我发现代码在call createLabel的时候出现错误!
创建标签的时候,数据类型缺少引号
正确的:
CALL db.createLabel('vertex', 'new_label', 'id', ['id','int32',false], ['name','string', true]);
错误的:
CALL db.createLabel('vertex', 'new_label', 'id', ['id',int32,false], ['name',string, true]);

@Zhaohaoran1997
Copy link

试了下确实是这样,把参数里的类型用引号引起来就能跑通了

@maco6096
Copy link

通过Web UI 添加知识库也存在同样的问题,应该是bug

@BrucePayton
Copy link

没错,确实是这样,修改路径:dbgpt\storage\graph_store\tugraph_store.py
修改如下:
image

@abxis
Copy link

abxis commented Oct 11, 2024

微信图片_20241011135720
微信图片_20241011135851
这个怎么解决呢?

@abxis
Copy link

abxis commented Oct 11, 2024

没错,确实是这样,修改路径:dbgpt\storage\graph_store\tugraph_store.py 修改如下: image

微信图片_20241011135851
这个怎么解决呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Waiting for reply
Projects
None yet
Development

No branches or pull requests

5 participants