浏览代码

fix(提示词增加施工单位和监理单位)

tangle 1 月之前
父节点
当前提交
7b93f5f6c5
共有 2 个文件被更改,包括 8 次插入1 次删除
  1. 2 0
      core/construction_write/component/outline_generator.py
  2. 6 1
      views/construction_write/outline_views.py

+ 2 - 0
core/construction_write/component/outline_generator.py

@@ -1098,6 +1098,8 @@ class OutlineGenerator:
 【项目信息】
 项目名称:{project_name}
 章节层级:第{level}级
+施工单位: {project_info.get("construction_unit", "xx施工单位")}
+监理单位: {project_info.get("supervision_unit", "xx监理单位")}
 
 【任务边界】
 你不是在创作新章节,而是在校订下面的【参考模板】。

+ 6 - 1
views/construction_write/outline_views.py

@@ -63,6 +63,8 @@ class BaseInfo(BaseModel):
     project_name: str = Field(..., description="方案名称", example="罗成依达大桥上部结构专项施工方案")
     construct_location: str = Field(..., description="建设地点", example="四川省凉山州")
     engineering_type: str = Field(..., description="方案模版类型", example="T型梁")
+    construction_unit: str = Field(..., description="施工单位")
+    supervision_unit: str = Field(..., description="监理单位")
 
 
 class ProjectInfo(BaseModel):
@@ -725,7 +727,10 @@ async def generating_outline(request: OutlineGenerationRequest):
                 "project_name": base_info.project_name,
                 "construct_location": base_info.construct_location,
                 "engineering_type": base_info.engineering_type,
-                "selectable": request.project_info.selectable or ""
+                "selectable": request.project_info.selectable or "",
+                "construction_unit": base_info.construction_unit or "",
+                "supervision_unit": base_info.supervision_unit or ""
+
             }
 
             sgbx_task_info = {