DocArray
DocArray 是一個用於傳輸中巢狀、非結構化、多模態資料的函式庫,包括文字、圖像、音訊、視訊、3D 網格等。它允許深度學習工程師使用 Pythonic API 有效率地處理、嵌入、搜尋、推薦、儲存和傳輸多模態資料。
安裝與設定
我們需要安裝 docarray
python 套件。
pip install docarray
向量儲存庫
LangChain 提供從 DocArray
函式庫存取 In-memory
和 HNSW
向量儲存庫的途徑。
請參閱使用範例。
from langchain_community.vectorstores import DocArrayHnswSearch
API 參考:DocArrayHnswSearch
請參閱使用範例。
from langchain_community.vectorstores DocArrayInMemorySearch
檢索器
請參閱使用範例。
from langchain_community.retrievers import DocArrayRetriever
API 參考:DocArrayRetriever