huggingface obey consistency

This commit is contained in:
Xi Yan 2025-03-12 21:37:13 -07:00
parent 09039eca57
commit 4cc1958af9
3 changed files with 76 additions and 49 deletions

View file

@ -55,18 +55,26 @@ class URIDataSource(BaseModel):
uri: str
@json_schema_type
class HuggingfaceDataSource(BaseModel):
"""A dataset stored in Huggingface.
class HuggingfaceDataSourceFields(BaseModel):
"""The fields for a Huggingface dataset.
:param path: The path to the dataset in Huggingface. E.g.
- "llamastack/simpleqa"
:param params: The parameters for the dataset.
"""
type: Literal["huggingface"] = "huggingface"
path: str
params: Dict[str, Any]
@json_schema_type
class HuggingfaceDataSource(BaseModel):
"""A dataset stored in Huggingface.
:param type: The type of the data source.
:param huggingface: The fields for a Huggingface dataset.
"""
type: Literal["huggingface"] = "huggingface"
huggingface: HuggingfaceDataSourceFields
@json_schema_type
class RowsDataSource(BaseModel):
"""A dataset stored in rows.