feat(lightrag): 添加 查询时使用embedding缓存功能
- 在 LightRAG 类中添加 embedding_cache_config配置项 - 实现基于 embedding 相似度的缓存查询和存储 - 添加量化和反量化函数,用于压缩 embedding 数据 - 新增示例演示 embedding 缓存的使用
This commit is contained in:
@@ -62,7 +62,7 @@ async def main():
|
||||
working_dir=WORKING_DIR,
|
||||
embedding_cache_config={
|
||||
"enabled": True,
|
||||
"similarity_threshold": 0.90, # 可以自定义阈值
|
||||
"similarity_threshold": 0.90,
|
||||
},
|
||||
llm_model_func=llm_model_func,
|
||||
embedding_func=EmbeddingFunc(
|
||||
|
Reference in New Issue
Block a user