mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
4221cf7731
All output classes need to have their properties flagged as `required` for the schema generation to work as needed.
23 lines
496 B
Python
23 lines
496 B
Python
from typing import Literal
|
|
|
|
from pydantic.fields import Field
|
|
|
|
from .baseinvocation import BaseInvocationOutput
|
|
|
|
|
|
class PromptOutput(BaseInvocationOutput):
|
|
"""Base class for invocations that output a prompt"""
|
|
#fmt: off
|
|
type: Literal["prompt"] = "prompt"
|
|
|
|
prompt: str = Field(default=None, description="The output prompt")
|
|
#fmt: on
|
|
|
|
class Config:
|
|
schema_extra = {
|
|
'required': [
|
|
'type',
|
|
'prompt',
|
|
]
|
|
}
|