mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-10 12:18:30 +00:00
Changes after merge.
This commit is contained in:
parent
6b9f673fdb
commit
1eeba2cc8a
1 changed files with 11 additions and 0 deletions
|
@ -702,12 +702,15 @@ class PreprocessingRouter(Preprocessing):
|
||||||
self,
|
self,
|
||||||
routing_table: RoutingTable,
|
routing_table: RoutingTable,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
logcat.debug("core", "Initializing PreprocessingRouter")
|
||||||
self.routing_table = routing_table
|
self.routing_table = routing_table
|
||||||
|
|
||||||
async def initialize(self) -> None:
|
async def initialize(self) -> None:
|
||||||
|
logcat.debug("core", "PreprocessingRouter.initialize")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
async def shutdown(self) -> None:
|
async def shutdown(self) -> None:
|
||||||
|
logcat.debug("core", "PreprocessingRouter.shutdown")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
async def preprocess(
|
async def preprocess(
|
||||||
|
@ -716,6 +719,10 @@ class PreprocessingRouter(Preprocessing):
|
||||||
preprocessor_inputs: List[PreprocessingDataElement],
|
preprocessor_inputs: List[PreprocessingDataElement],
|
||||||
options: Optional[PreprocessorOptions] = None,
|
options: Optional[PreprocessorOptions] = None,
|
||||||
) -> PreprocessorResponse:
|
) -> PreprocessorResponse:
|
||||||
|
logcat.debug(
|
||||||
|
"core",
|
||||||
|
f"PreprocessingRouter.preprocess: {preprocessor_id}, {len(preprocessor_inputs)} inputs, options={options}",
|
||||||
|
)
|
||||||
return await self.routing_table.get_provider_impl(preprocessor_id).preprocess(
|
return await self.routing_table.get_provider_impl(preprocessor_id).preprocess(
|
||||||
preprocessor_id=preprocessor_id,
|
preprocessor_id=preprocessor_id,
|
||||||
preprocessor_inputs=preprocessor_inputs,
|
preprocessor_inputs=preprocessor_inputs,
|
||||||
|
@ -727,5 +734,9 @@ class PreprocessingRouter(Preprocessing):
|
||||||
preprocessors: PreprocessorChain,
|
preprocessors: PreprocessorChain,
|
||||||
preprocessor_inputs: List[PreprocessingDataElement],
|
preprocessor_inputs: List[PreprocessingDataElement],
|
||||||
) -> PreprocessorResponse:
|
) -> PreprocessorResponse:
|
||||||
|
logcat.debug(
|
||||||
|
"core",
|
||||||
|
f"PreprocessingRouter.chain_preprocess: preprocessors {[p.preprocessor_id for p in preprocessors]}, {len(preprocessor_inputs)} inputs",
|
||||||
|
)
|
||||||
preprocessor_impls = [self.routing_table.get_provider_impl(p.preprocessor_id) for p in preprocessors]
|
preprocessor_impls = [self.routing_table.get_provider_impl(p.preprocessor_id) for p in preprocessors]
|
||||||
return await execute_preprocessor_chain(preprocessors, preprocessor_impls, preprocessor_inputs)
|
return await execute_preprocessor_chain(preprocessors, preprocessor_impls, preprocessor_inputs)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue