feat:Add Knowledge Process Workflow (#2210)

This commit is contained in:
Aries-ckt
2024-12-18 11:16:30 +08:00
committed by GitHub
parent 3745d7411d
commit b05febbf77
23 changed files with 7217 additions and 8 deletions

View File

@@ -67,7 +67,9 @@ class KnowledgeSpaceRetrieverResource(RetrieverResource):
# TODO: Build the retriever in a thread pool, it will block the event loop
retriever = KnowledgeSpaceRetriever(
space_id=space_name,
top_k=context.get("top_k", None) if context else 4,
top_k=context.get("top_k", None)
if context
else CFG.KNOWLEDGE_SEARCH_TOP_SIZE,
)
super().__init__(name, retriever=retriever)