forked from phoenix-oss/llama-stack-mirror
Revert "add model type to APIs" (#605)
Reverts meta-llama/llama-stack#588
This commit is contained in:
parent
8e33db6015
commit
47b2dc8ae3
6 changed files with 13 additions and 77 deletions
|
@ -4,7 +4,6 @@
|
|||
# This source code is licensed under the terms described in the LICENSE file in
|
||||
# the root directory of this source tree.
|
||||
|
||||
from enum import Enum
|
||||
from typing import Any, Dict, List, Literal, Optional, Protocol, runtime_checkable
|
||||
|
||||
from llama_models.schema_utils import json_schema_type, webmethod
|
||||
|
@ -21,11 +20,6 @@ class CommonModelFields(BaseModel):
|
|||
)
|
||||
|
||||
|
||||
class ModelType(Enum):
|
||||
llm = "llm"
|
||||
embedding_model = "embedding"
|
||||
|
||||
|
||||
@json_schema_type
|
||||
class Model(CommonModelFields, Resource):
|
||||
type: Literal[ResourceType.model.value] = ResourceType.model.value
|
||||
|
@ -40,14 +34,11 @@ class Model(CommonModelFields, Resource):
|
|||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
model_type: ModelType = Field(default=ModelType.llm)
|
||||
|
||||
|
||||
class ModelInput(CommonModelFields):
|
||||
model_id: str
|
||||
provider_id: Optional[str] = None
|
||||
provider_model_id: Optional[str] = None
|
||||
model_type: Optional[ModelType] = ModelType.llm
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
@ -68,7 +59,6 @@ class Models(Protocol):
|
|||
provider_model_id: Optional[str] = None,
|
||||
provider_id: Optional[str] = None,
|
||||
metadata: Optional[Dict[str, Any]] = None,
|
||||
model_type: Optional[ModelType] = None,
|
||||
) -> Model: ...
|
||||
|
||||
@webmethod(route="/models/unregister", method="POST")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue