mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-18 16:59:47 +00:00
support adding alias for models without hf repo/sku entry
This commit is contained in:
parent
fcc2132e6f
commit
8bd0a33206
2 changed files with 18 additions and 7 deletions
|
|
@ -36,6 +36,16 @@ def build_model_alias(provider_model_id: str, model_descriptor: str) -> ModelAli
|
|||
)
|
||||
|
||||
|
||||
def build_model_alias_with_just_llama_model(
|
||||
provider_model_id: str, model_descriptor: str
|
||||
) -> ModelAlias:
|
||||
return ModelAlias(
|
||||
provider_model_id=provider_model_id,
|
||||
aliases=[],
|
||||
llama_model=model_descriptor,
|
||||
)
|
||||
|
||||
|
||||
class ModelRegistryHelper(ModelsProtocolPrivate):
|
||||
def __init__(self, model_aliases: List[ModelAlias]):
|
||||
self.alias_to_provider_id_map = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue