feat:
1. 建立问题库大纲,对应每个人生阶段槽位 2. 鼓励使用更生活化的交流语言共情与总结 3. 降低评审模型可能发生截断的概率 4. 成稿质量维度强化情感表达和上下文连贯性
This commit is contained in:
@@ -118,13 +118,10 @@ def memoir_quality_pass(
|
||||
db, story, llm, chapter_category=chapter_category
|
||||
):
|
||||
titles_polished += 1
|
||||
stmt = (
|
||||
select(Chapter.id)
|
||||
.where(
|
||||
Chapter.user_id == user_id,
|
||||
Chapter.category == chapter_category,
|
||||
Chapter.is_active == True, # noqa: E712
|
||||
)
|
||||
stmt = select(Chapter.id).where(
|
||||
Chapter.user_id == user_id,
|
||||
Chapter.category == chapter_category,
|
||||
Chapter.is_active == True, # noqa: E712
|
||||
)
|
||||
ch_id = db.execute(stmt).scalar_one_or_none()
|
||||
if ch_id:
|
||||
@@ -171,7 +168,5 @@ def memoir_quality_pass(
|
||||
except Retry:
|
||||
raise
|
||||
except Exception as e:
|
||||
logger.error(
|
||||
"event=quality_pass_failed user_id={} exc={}", user_id, e
|
||||
)
|
||||
logger.error("event=quality_pass_failed user_id={} exc={}", user_id, e)
|
||||
raise self.retry(exc=e) from e
|
||||
|
||||
@@ -871,11 +871,7 @@ def generate_chapter_content(self, user_id: str, stage: str, new_content: str):
|
||||
db.refresh(chapter)
|
||||
|
||||
ch_ids: set[str] = {str(chapter.id)}
|
||||
cover_ids = (
|
||||
ch_ids
|
||||
if chapter_needs_cover_enqueue(chapter)
|
||||
else set()
|
||||
)
|
||||
cover_ids = ch_ids if chapter_needs_cover_enqueue(chapter) else set()
|
||||
_run_post_pipeline_commit(
|
||||
user_id=user_id,
|
||||
story_dispatch_ids=set(dispatch_ids),
|
||||
|
||||
Reference in New Issue
Block a user