refactored config
This commit is contained in:
parent
9be715e16a
commit
0806626f51
|
|
@ -8,23 +8,20 @@ from typing import Literal, Union, Annotated, Optional, List
|
|||
class BaseAction(BaseModel):
|
||||
action_type: Literal["wait", "comment"]
|
||||
|
||||
class Config(BaseConfig):
|
||||
pass
|
||||
|
||||
|
||||
class WaitAction(BaseAction):
|
||||
action_type: Literal["wait"]
|
||||
wait_for: int
|
||||
|
||||
class Config(BaseConfig):
|
||||
pass
|
||||
|
||||
|
||||
class CommentAction(BaseAction):
|
||||
action_type: Literal["comment"]
|
||||
text: Annotated[Optional[str], Field(default=None)]
|
||||
file_urls: Annotated[Optional[List[str]], Field(default=[])]
|
||||
|
||||
class Config(BaseConfig):
|
||||
pass
|
||||
|
||||
|
||||
Action = Annotated[Union[WaitAction, CommentAction], Field(description="action_type")]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user