Vector Stores 存储在 LangChain 中。

huangapple go评论92阅读模式
英文:

Vector Stores storage in LangChain

问题

我第一次与LangChain合作。由于数据安全,我想确保langchain的向量存储存储的存储方式。我正在使用HNSWLib向量存储,它提到是一个内存中的存储。这是什么意思?Langchain/向量存储是否在其服务器上存储任何数据?

英文:

I am working with LangChain for the first time. Due to data security, I want to be sure about the storage of langchain's vector store storage. I am using HNSWLib vector store, which mentions it is an in-memory store. What does it mean? Does Langchain/vector stores store any data in its servers?

https://js.langchain.com/docs/modules/indexes/vector_stores/integrations/hnswlib
https://github.com/nmslib/hnswlib

答案1

得分: 3

HNSWLib 将数据存储在托管项目的服务器中。因此,如果您将服务器托管到 Vercel,则您的向量存储将在 Vercel 服务器的内存中运行。您可以通过执行 await vectorStore.save(directory); 来测试此逻辑是否正确,这将在您的项目目录中生成向量文件。

英文:

HNSWLib store data in the server where the project is host. So if you host your server into vercel then your vector store is running in memory in vercel server. You can test this logic if true when you execute await vectorStore.save(directory); which will generate vector files inside your project directory.

huangapple
  • 本文由 发表于 2023年6月5日 15:52:59
  • 转载请务必保留本文链接:https://go.coder-hub.com/76404464.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定