mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-10 21:09:03 +08:00
Refa: add meta data to retrieval. (#6676)
### What problem does this PR solve? #6619 ### Type of change - [x] Performance Improvement
This commit is contained in:
parent
2793c8e4fe
commit
60b9c027c8
@ -24,6 +24,7 @@ from api.db.services.llm_service import LLMBundle
|
|||||||
from api import settings
|
from api import settings
|
||||||
from agent.component.base import ComponentBase, ComponentParamBase
|
from agent.component.base import ComponentBase, ComponentParamBase
|
||||||
from rag.app.tag import label_question
|
from rag.app.tag import label_question
|
||||||
|
from rag.prompts import kb_prompt
|
||||||
from rag.utils.tavily_conn import Tavily
|
from rag.utils.tavily_conn import Tavily
|
||||||
|
|
||||||
|
|
||||||
@ -102,9 +103,7 @@ class Retrieval(ComponentBase, ABC):
|
|||||||
df["empty_response"] = self._param.empty_response
|
df["empty_response"] = self._param.empty_response
|
||||||
return df
|
return df
|
||||||
|
|
||||||
df = pd.DataFrame(kbinfos["chunks"])
|
df = pd.DataFrame({"content": kb_prompt(kbinfos, 200000)})
|
||||||
df["content"] = df["content_with_weight"]
|
|
||||||
del df["content_with_weight"]
|
|
||||||
logging.debug("{} {}".format(query, df))
|
logging.debug("{} {}".format(query, df))
|
||||||
return df.dropna()
|
return df.dropna()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user