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

Update MyFAISS.py #648

Merged
merged 1 commit into from
Jun 16, 2023
Merged

Update MyFAISS.py #648

merged 1 commit into from
Jun 16, 2023

Conversation

foxmoon
Copy link
Contributor

@foxmoon foxmoon commented Jun 16, 2023

防止i不存在时候错误,
langchain-ChatGLM/vectorstores/MyFAISS.py", line 55, in similarity_search_with_score_by_vector
_id = self.index_to_docstore_id[i]
KeyError: 4

防止i不存在时候错误,
langchain-ChatGLM/vectorstores/MyFAISS.py", line 55, in similarity_search_with_score_by_vector
    _id = self.index_to_docstore_id[i]
KeyError: 4
@imClumsyPanda imClumsyPanda changed the base branch from master to dev June 16, 2023 15:47
@imClumsyPanda imClumsyPanda merged commit 2311fb0 into chatchat-space:dev Jun 16, 2023
@imClumsyPanda imClumsyPanda mentioned this pull request Jun 16, 2023
@imClumsyPanda
Copy link
Collaborator

您好,感谢对本项目做出的贡献!

经检查目前遇到的这个问题是langchain中faiss类需完成对应向量从faiss.index, faiss.index_to_docstore_id 和 faiss.docstore 中都删除对应向量,目前已完成后两个类中对应向量删除,faiss.index中向量删除暂未找到合适方法。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants