赞
踩
参考:
https://docs.trychroma.com/usage-guide
https://blog.csdn.net/weixin_46515328/article/details/131855650
##安装
pip install chromadb
import chromadb ##这句可以数据库默认时刻保存,启动自动加载 chroma_client = chromadb.PersistentClient(path=".") # chroma_client = chromadb.Client() #创建Chroma数据集 collection = chroma_client.create_collection(name="my_collection2") # 插入向量: collection.add( embeddings=[[1.2, 2.3, 4.5], [6.7, 8.2, 9.2]], # documents=["This is a document", "This is another document"], metadatas=[{"source": "my_source"}, {"source": "my_source"}], ids=["id3", "id5"] )
修改距离:
参考:https://github.com/nmslib/hnswlib/tree/master#python-bindings
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。