Skip to content

Commit

Permalink
summarizer input model tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vinicvaz committed Jan 18, 2024
1 parent 6a12755 commit 015a29f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions pieces/PromptCreatorForImageGeneratorPiece/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class InputModel(BaseModel):
"""
context: str = Field(
...,
description="The context to generate an image from"
description="The context to generate an image from",
)
art_style: str = Field(
default="You know many art styles, so you always vary a lot on your suggestions!",
Expand All @@ -32,7 +32,7 @@ class InputModel(BaseModel):
output_type: OutputTypeType = Field(
default=OutputTypeType.string,
description="The type of output to return"

)
openai_model: LLMModelType = Field(
default=LLMModelType.gpt_3_5_turbo,
Expand Down Expand Up @@ -67,7 +67,7 @@ class OutputModel(BaseModel):
class SecretsModel(BaseModel):
"""
PromptCreatorForImageGeneratorPiece secrets model
"""
"""
OPENAI_API_KEY: str = Field(
description="Your OpenAI API key"
)
2 changes: 1 addition & 1 deletion pieces/TextGeneratorPiece/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class InputModel(BaseModel):
description="OpenAI model name."
)
completion_max_tokens: int = Field(
default=500,
default=500,
description="The maximum number of tokens in the generated text."
)
temperature: float = Field(
Expand Down
8 changes: 4 additions & 4 deletions pieces/TextSummarizerPiece/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ class InputModel(BaseModel):
"""
TextSummarizerPiece Input model
"""
text: Optional[str] = Field(
default=None,
text: str = Field(
default="",
description="Text to summarize",
json_schema_extra={
'widget': "textarea",
}
)
text_file_path: Optional[str] = Field(
default=None,
text_file_path: str = Field(
default="",
description="Use it only if not using text field. File path to the text to summarize",
json_schema_extra={
"from_upstream": "always"
Expand Down

0 comments on commit 015a29f

Please sign in to comment.