fix(rag): align knowledge engine plugin actions

This commit is contained in:
huanghuoguoguo
2026-05-16 10:34:10 +08:00
parent 711f12d71f
commit 395572c64d
5 changed files with 17 additions and 19 deletions

View File

@@ -839,15 +839,6 @@ class PluginRuntimeConnector(ManagedRuntimeConnector):
async for ret in gen:
yield ret
# KnowledgeRetriever methods
async def list_knowledge_retrievers(self, bound_plugins: list[str] | None = None) -> list[dict[str, Any]]:
"""List all available KnowledgeRetriever components."""
if not self.is_enable_plugin:
return []
retrievers_data = await self.handler.list_knowledge_retrievers(include_plugins=bound_plugins)
return retrievers_data
async def retrieve_knowledge(
self,
plugin_author: str,

View File

@@ -979,7 +979,7 @@ class RuntimeConnectionHandler(handler.Handler):
except Exception as e:
return _make_rag_error_response(e, 'VectorStoreError', collection_id=collection_id)
@self.action(PluginToRuntimeAction.GET_KNOWLEDEGE_FILE_STREAM)
@self.action(PluginToRuntimeAction.GET_KNOWLEDGE_FILE_STREAM)
async def get_knowledge_file_stream(data: dict[str, Any]) -> handler.ActionResponse:
storage_path = data['storage_path']
try:

View File

@@ -107,7 +107,7 @@ class RAGRuntimeService:
)
async def get_file_stream(self, storage_path: str) -> bytes:
"""Handle GET_KNOWLEDEGE_FILE_STREAM action.
"""Handle GET_KNOWLEDGE_FILE_STREAM action.
Uses the storage manager abstraction to load file content,
regardless of the underlying storage provider.