模板在线编辑与导出链路重构
This commit is contained in:
@@ -43,8 +43,32 @@ class ParagraphConfig(BaseModel):
|
||||
file_note: str = ""
|
||||
output_format: str = "text"
|
||||
|
||||
|
||||
class TemplateBlockConfig(BaseModel):
|
||||
id: int = 0
|
||||
source_paragraph_id: Optional[int] = None
|
||||
parent_block_id: Optional[int] = None
|
||||
sort_index: int = 0
|
||||
block_type: str = "text"
|
||||
anchor_ref: str = ""
|
||||
title: str = ""
|
||||
content_json: dict[str, Any] = Field(default_factory=dict)
|
||||
style_json: str = "{}"
|
||||
edit_mode: str = "manual"
|
||||
placeholder_key: str = ""
|
||||
variable_key: str = ""
|
||||
default_value: str = ""
|
||||
model_id: Optional[int] = None
|
||||
need_prompt: bool = True
|
||||
prompt_text: str = ""
|
||||
need_file: bool = False
|
||||
file_note: str = ""
|
||||
output_format: str = "text"
|
||||
|
||||
class TemplateSave(BaseModel):
|
||||
save_mode: str = "paragraph"
|
||||
paragraphs: list[ParagraphConfig] = []
|
||||
blocks: list[TemplateBlockConfig] = []
|
||||
|
||||
# 模型
|
||||
class AiModelCreate(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user