tidy(mm): better descriptions for model configs

This commit is contained in:
psychedelicious
2024-03-01 23:04:33 +11:00
parent 9378e47a06
commit 2411bf53c0

View File

@ -132,13 +132,15 @@ class ModelSourceType(str, Enum):
class ModelConfigBase(BaseModel): class ModelConfigBase(BaseModel):
"""Base class for model configuration information.""" """Base class for model configuration information."""
path: str = Field(description="filesystem path to the model file or directory") key: str = Field(description="A unique key for this model.")
name: str = Field(description="model name") hash: str = Field(description="The hash of the model file(s).")
base: BaseModelType = Field(description="base model") path: str = Field(
key: str = Field(description="unique key for model", default="<NOKEY>") description="Path to the model on the filesystem. Relative paths are relative to the Invoke root directory."
hash: Optional[str] = Field(description="original fasthash of model contents", default=None) )
name: str = Field(description="Name of the model.")
base: BaseModelType = Field(description="The base model.")
description: Optional[str] = Field(description="Model description", default=None) description: Optional[str] = Field(description="Model description", default=None)
source: str = Field(description="The source of the model (e.g. path, URL, HF Repo ID)") source: str = Field(description="The original source of the model (path, URL or repo_id).")
source_type: ModelSourceType = Field(description="The type of source") source_type: ModelSourceType = Field(description="The type of source")
@staticmethod @staticmethod