@@ -555,19 +555,19 @@ async def vector_delete(data: dict[str, Any]) -> handler.ActionResponse:
555555 except Exception as e :
556556 return _make_rag_error_response (e , 'VectorStoreError' , collection_id = collection_id )
557557
558- @ self . action (PluginToRuntimeAction . VECTOR_LIST )
559- async def vector_list ( data : dict [ str , Any ]) -> handler . ActionResponse :
560- collection_id = data [ 'collection_id' ]
561- filters = data . get ( 'filters' )
562- limit = data . get ( 'limit' , 20 )
563- offset = data .get ('offset' , 0 )
564- try :
565- items , total = await self . ap . rag_runtime_service . vector_list (
566- collection_id , filters , limit , offset
567- )
568- return handler .ActionResponse .success (data = {'items' : items , 'total' : total })
569- except Exception as e :
570- return _make_rag_error_response (e , 'VectorStoreError' , collection_id = collection_id )
558+ if hasattr (PluginToRuntimeAction , ' VECTOR_LIST' ):
559+
560+ @ self . action ( PluginToRuntimeAction . VECTOR_LIST )
561+ async def vector_list ( data : dict [ str , Any ]) -> handler . ActionResponse :
562+ collection_id = data [ 'collection_id' ]
563+ filters = data .get ('filters' )
564+ limit = data . get ( 'limit' , 20 )
565+ offset = data . get ( 'offset' , 0 )
566+ try :
567+ items , total = await self . ap . rag_runtime_service . vector_list ( collection_id , filters , limit , offset )
568+ return handler .ActionResponse .success (data = {'items' : items , 'total' : total })
569+ except Exception as e :
570+ return _make_rag_error_response (e , 'VectorStoreError' , collection_id = collection_id )
571571
572572 @self .action (PluginToRuntimeAction .GET_KNOWLEDEGE_FILE_STREAM )
573573 async def get_knowledge_file_stream (data : dict [str , Any ]) -> handler .ActionResponse :
0 commit comments