From 5aa9c243ec852ba361f62b5112d8019abc027ba7 Mon Sep 17 00:00:00 2001 From: Vinicius Vaz Date: Tue, 24 Oct 2023 17:24:43 -0300 Subject: [PATCH] update models with required --- .domino/compiled_metadata.json | 25 +++++-------------------- pieces/TextSummarizerPiece/models.py | 2 +- pieces/WhisperPiece/models.py | 3 ++- 3 files changed, 8 insertions(+), 22 deletions(-) diff --git a/.domino/compiled_metadata.json b/.domino/compiled_metadata.json index a56bb06..90625a8 100644 --- a/.domino/compiled_metadata.json +++ b/.domino/compiled_metadata.json @@ -38,15 +38,8 @@ "file_path": { "title": "File Path", "description": "The path to the text file to process.", - "anyOf": [ - { - "type": "string", - "format": "file-path" - }, - { - "type": "string" - } - ] + "required": true, + "type": "string" }, "model_size": { "description": "The size of the model to use.", @@ -128,7 +121,7 @@ } }, "secrets_schema": null, - "source_url": "https://github.com/Tauffer-Consulting/ml_domino_pieces/tree/main/pieces/WhisperPiece" + "source_url": "Tauffer-Consulting/ml_domino_pieces//tree/main/pieces/WhisperPiece" }, "TextSummarizerPiece": { "name": "TextSummarizerPiece", @@ -170,15 +163,7 @@ "title": "Input File Path", "description": "The path to the text file to summarize.", "default": "", - "anyOf": [ - { - "type": "string", - "format": "file-path" - }, - { - "type": "string" - } - ] + "type": "string" }, "input_text": { "title": "Input Text", @@ -248,6 +233,6 @@ } }, "secrets_schema": null, - "source_url": "https://github.com/Tauffer-Consulting/ml_domino_pieces/tree/main/pieces/TextSummarizerPiece" + "source_url": "Tauffer-Consulting/ml_domino_pieces//tree/main/pieces/TextSummarizerPiece" } } \ No newline at end of file diff --git a/pieces/TextSummarizerPiece/models.py b/pieces/TextSummarizerPiece/models.py index a18d7a2..7e8fbde 100644 --- a/pieces/TextSummarizerPiece/models.py +++ b/pieces/TextSummarizerPiece/models.py @@ -12,7 +12,7 @@ class InputModel(BaseModel): """ Input data for TextSummarizerPiece """ - input_file_path: Union[FilePath, str] = Field( + input_file_path: str = Field( description='The path to the text file to summarize.', default="" ) diff --git a/pieces/WhisperPiece/models.py b/pieces/WhisperPiece/models.py index d7230d8..4f6e7d9 100644 --- a/pieces/WhisperPiece/models.py +++ b/pieces/WhisperPiece/models.py @@ -20,8 +20,9 @@ class InputModel(BaseModel): """ Input data for WhisperPiece """ - file_path: Union[FilePath, str] = Field( + file_path: str = Field( description='The path to the text file to process.', + required=True ) model_size: ModelSizeType = Field( description='The size of the model to use.',