yangdx
commited on
Commit
·
493d8f0
1
Parent(s):
eef8740
Add embedding cache config and disable LLM cache for entity extraction for API Server
Browse files
lightrag/api/lightrag_server.py
CHANGED
@@ -919,6 +919,12 @@ def create_app(args):
|
|
919 |
vector_db_storage_cls_kwargs={
|
920 |
"cosine_better_than_threshold": args.cosine_threshold
|
921 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
922 |
)
|
923 |
else:
|
924 |
rag = LightRAG(
|
@@ -942,6 +948,12 @@ def create_app(args):
|
|
942 |
vector_db_storage_cls_kwargs={
|
943 |
"cosine_better_than_threshold": args.cosine_threshold
|
944 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
945 |
)
|
946 |
|
947 |
async def index_file(file_path: Union[str, Path]) -> None:
|
|
|
919 |
vector_db_storage_cls_kwargs={
|
920 |
"cosine_better_than_threshold": args.cosine_threshold
|
921 |
},
|
922 |
+
enable_llm_cache_for_entity_extract=False,
|
923 |
+
embedding_cache_config={
|
924 |
+
"enabled": True,
|
925 |
+
"similarity_threshold": 0.95,
|
926 |
+
"use_llm_check": False,
|
927 |
+
},
|
928 |
)
|
929 |
else:
|
930 |
rag = LightRAG(
|
|
|
948 |
vector_db_storage_cls_kwargs={
|
949 |
"cosine_better_than_threshold": args.cosine_threshold
|
950 |
},
|
951 |
+
enable_llm_cache_for_entity_extract=False,
|
952 |
+
embedding_cache_config={
|
953 |
+
"enabled": True,
|
954 |
+
"similarity_threshold": 0.95,
|
955 |
+
"use_llm_check": False,
|
956 |
+
},
|
957 |
)
|
958 |
|
959 |
async def index_file(file_path: Union[str, Path]) -> None:
|