Files
life-echo/api/app/agents/memoir/placeholder_agent.py
2026-03-19 14:36:40 +08:00

16 lines
504 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
PlaceholderInjectAgent对 narrative 做占位符模板注入。
对应现有逻辑inject_image_placeholder_template
纯函数式,无 LLM 调用。
"""
from app.agents.memoir.prompts import inject_image_placeholder_template
def inject_placeholders(content: str) -> str:
"""
对章节正文做占位符处理:匹配所有图片占位符,拼上固定模板。
与 inject_image_placeholder_template 行为一致。
"""
return inject_image_placeholder_template(content)