Как видно из репозитория FAISS на GitHub, я создаю такой индекс и добавляю в него векторы:
Код: Выделить всё
import faiss # make faiss available
index = faiss.IndexFlatL2(d) # build the index
index.add(xb) # add vectors to the index
Подробнее здесь: https://stackoverflow.com/questions/778 ... -langchain
Мобильная версия