-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
feat: support tidb vector #4588
Conversation
pls add the TIDB deploy docker-compose file and the unit test for TIDB, thanks @Weaxs |
TIDB vector feature is not open source currently, it will be opened at the end of year, |
hi @Weaxs , sorry for replying to you so late, you can refer to tencent vector db’s unit test , commit below : https://github.com/langgenius/dify/pull/3568/files#diff-4c59736efdfdaff3b01f2ea5fe03ff75dbb1c5d767c16898d524e3d0d53467aa |
I have submitted Could you please review it when you have time, thx |
|
||
def text_exists(self, id: str) -> bool: | ||
result = self.get_ids_by_metadata_field('doc_id', id) | ||
return len(result) > 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will caused : TypeError: object of type 'NoneType' has no len()
Description
Close #4381
Support TiDB Vector for knowledge.
pymysql
1.1.1 andtidb-vector
0.0.9TiDB Vector doc: https://docs.google.com/document/d/15eAO0xrvEd6_tTxW_zEko4CECwnnSwQg8GGrqK1Caiw/edit
Fixes # (issue)
Type of Change
Please delete options that are not relevant.
How Has This Been Tested?
Dify knowledge screenshot:
Tidb Cloud Chat2Qery screenshot:
update dify document for tidb vector https://github.com/langgenius/dify-docs
Suggested Checklist:
dev/reformat
(backend) andcd web && npx lint-staged
(frontend) to appease the lint godsoptional
I have made corresponding changes to the documentationoptional
I have added tests that prove my fix is effective or that my feature worksoptional
New and existing unit tests pass locally with my changes