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: ES VectorStore #1500
feat: ES VectorStore #1500
Conversation
Amazing feature, thanks for your contribution, we will test that and merge it. |
@IamWWT Hi, the Code style check failed. please use the |
hi, @IamWWT, I saw that you formatted other files that are not related to es_vector_store. Can you modify the files related to es? |
修改第三次commit的分支: 3d7f77c 在第二次提交的基础上仅仅修改了本次新增es涉及的.py文件的: 2)yapf : |
Test Success!
pip install langchain
pip install elasticsearch
VECTOR_STORE_TYPE=ElasticSearch
ELASTICSEARCH_URL=127.0.0.1
ELASTICSEARCH_PORT=9200
ELASTICSEARCH_USERNAME=elastic
ELASTICSEARCH_PASSWORD="{YOUR_PASSWORD}"
|
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.
LGTM.
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.
LGTM.
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.
Description
Close #1062
Close #79
Close #1483
已经验证通过的功能:
1)可以新建知识空间(支持英文数字组合,全中文组合的名称; 不支持中英文或者中文和数字字符混合的名称)
2)可以上传文档进行EMBEDDING。
3)可以逐个删除上传的每一个文档。
4)可以搜索对话。(引入了jieba分词算法jieba.analyse.textrank,后续可以根据语义优化,以便于更精准查找。)
How Has This Been Tested?
.env 文件里面配置如下四个变量后,其余的使用流程同"chat knowledge"知识对话使用流程。
VECTOR_STORE_TYPE=ElasticSearch
ElasticSearch_URL=127.0.0.1
ElasticSearch_PORT=9200
ElasticSearch_USERNAME=elastic
ElasticSearch_PASSWORD=i=+iLw9y0Jduq86XTi6W
为了方便方便查看es搜索匹配到的知识内容,
elastic_store.py
代码文件写了一个“es_search_results.txt”到项目根目录下,若不需要,注释代码即可 (关键词:result_file) 。Checklist: