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

@ -70,19 +70,8 @@ class PreprocessorStore(Protocol):
class Preprocessing(Protocol):
preprocessor_store: PreprocessorStore
input_types: List[PreprocessingDataType]
output_types: List[PreprocessingDataType]
@webmethod(route="/preprocess", method="POST")
async def preprocess(
self,
preprocessor_id: str,
preprocessor_inputs: List[PreprocessingDataElement],
options: Optional[PreprocessorOptions] = None,
) -> PreprocessorResponse: ...
@webmethod(route="/chain_preprocess", method="POST")
async def chain_preprocess(
self,
preprocessors: PreprocessorChain,
preprocessor_inputs: List[PreprocessingDataElement],