mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-31 07:30:00 +00:00
Updated the configuration files to include the preprocessor resource.
This commit is contained in:
parent
1a6e71c61f
commit
e16bdf138f
31 changed files with 52 additions and 2 deletions
|
|
@ -558,8 +558,11 @@ class PreprocessorsRoutingTable(CommonRoutingTableImpl, Preprocessors):
|
|||
self,
|
||||
preprocessor_id: str,
|
||||
provider_id: Optional[str] = None,
|
||||
provider_preprocessor_id: Optional[str] = None,
|
||||
metadata: Optional[Dict[str, Any]] = None,
|
||||
) -> Preprocessor:
|
||||
if provider_preprocessor_id is None:
|
||||
provider_preprocessor_id = preprocessor_id
|
||||
if provider_id is None:
|
||||
if len(self.impls_by_provider_id) == 1:
|
||||
provider_id = list(self.impls_by_provider_id.keys())[0]
|
||||
|
|
@ -569,11 +572,10 @@ class PreprocessorsRoutingTable(CommonRoutingTableImpl, Preprocessors):
|
|||
)
|
||||
preprocessor = Preprocessor(
|
||||
identifier=preprocessor_id,
|
||||
provider_resource_id=preprocessor_id,
|
||||
provider_resource_id=provider_preprocessor_id,
|
||||
provider_id=provider_id,
|
||||
metadata=metadata,
|
||||
)
|
||||
preprocessor.provider_id = provider_id
|
||||
await self.register_object(preprocessor)
|
||||
return preprocessor
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue