Simplified the preprocessing interface.

This commit is contained in:
ilya-kolchinsky 2025-03-11 13:05:48 +01:00
parent 1eeba2cc8a
commit ad4cf97604
8 changed files with 31 additions and 43 deletions

View file

@ -81,7 +81,7 @@ class MemoryToolRuntimeImpl(ToolsProtocolPrivate, ToolRuntime, RAGToolRuntime):
preprocessor_chain: Optional[PreprocessorChain] = None,
) -> None:
preprocessor_inputs = [self._rag_document_to_preprocessor_input(d) for d in documents]
preprocessor_response = await self.preprocessing_api.chain_preprocess(
preprocessor_response = await self.preprocessing_api.preprocess(
preprocessors=preprocessor_chain or self.DEFAULT_PREPROCESSING_CHAIN,
preprocessor_inputs=preprocessor_inputs,
)