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):
|
class BaseAction(BaseModel):
|
||||||
action_type: Literal["wait", "comment"]
|
action_type: Literal["wait", "comment"]
|
||||||
|
|
||||||
|
class Config(BaseConfig):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class WaitAction(BaseAction):
|
class WaitAction(BaseAction):
|
||||||
action_type: Literal["wait"]
|
action_type: Literal["wait"]
|
||||||
wait_for: int
|
wait_for: int
|
||||||
|
|
||||||
class Config(BaseConfig):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class CommentAction(BaseAction):
|
class CommentAction(BaseAction):
|
||||||
action_type: Literal["comment"]
|
action_type: Literal["comment"]
|
||||||
text: Annotated[Optional[str], Field(default=None)]
|
text: Annotated[Optional[str], Field(default=None)]
|
||||||
file_urls: Annotated[Optional[List[str]], Field(default=[])]
|
file_urls: Annotated[Optional[List[str]], Field(default=[])]
|
||||||
|
|
||||||
class Config(BaseConfig):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
Action = Annotated[Union[WaitAction, CommentAction], Field(description="action_type")]
|
Action = Annotated[Union[WaitAction, CommentAction], Field(description="action_type")]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user