'commit'
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import asyncio
|
||||
|
||||
from raganything import RAGAnything, RAGAnythingConfig
|
||||
from lightrag.llm.openai import openai_complete_if_cache, openai_embed
|
||||
from lightrag.utils import EmbeddingFunc
|
||||
@@ -94,6 +95,15 @@ async def main():
|
||||
base_url=Config.Config.EMBED_BASE_URL,
|
||||
),
|
||||
)
|
||||
from functools import partial
|
||||
from lightrag.rerank import cohere_rerank
|
||||
|
||||
rerank_model_func = partial(
|
||||
cohere_rerank,
|
||||
model=Config.Config.RERANK_MODEL,
|
||||
api_key=Config.Config.RERANK_BINDING_API_KEY,
|
||||
base_url=Config.Config.RERANK_BASE_URL,
|
||||
)
|
||||
|
||||
# 初始化 RAGAnything
|
||||
rag = RAGAnything(
|
||||
@@ -101,6 +111,7 @@ async def main():
|
||||
llm_model_func=llm_model_func,
|
||||
vision_model_func=vision_model_func,
|
||||
embedding_func=embedding_func,
|
||||
#rerank_model_func=rerank_model_func,
|
||||
)
|
||||
|
||||
# 处理文档
|
||||
|
16
dsRagAnything/rag_storage/kv_store_parse_cache.json
Normal file
16
dsRagAnything/rag_storage/kv_store_parse_cache.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"cf4c4c9f961df2a5953e69e074752aaf": {
|
||||
"content_list": [],
|
||||
"doc_id": "doc-d41d8cd98f00b204e9800998ecf8427e",
|
||||
"mtime": 1756180574.9404216,
|
||||
"parse_config": {
|
||||
"parser": "mineru",
|
||||
"parse_method": "auto"
|
||||
},
|
||||
"cached_at": 1756187088.1039026,
|
||||
"cache_version": "1.0",
|
||||
"create_time": 1756187088,
|
||||
"update_time": 1756187088,
|
||||
"_id": "cf4c4c9f961df2a5953e69e074752aaf"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user