attempt to improve post creation

This commit is contained in:
2026-03-16 13:49:07 +01:00
parent 17799a05ce
commit d4bf3fe25d
5 changed files with 377 additions and 18 deletions

View File

@@ -4373,6 +4373,16 @@ async def chat_generate_post(request: Request):
"relevance": "User-specified content"
}
plan = await orchestrator.generate_post_plan(
topic=topic,
profile_analysis=profile_analysis.full_analysis,
company_strategy=company_strategy,
strategy_weight=getattr(post_type, 'strategy_weight', 0.5),
user_thoughts=message
)
if plan:
topic["post_plan"] = plan
# Generate post
post_content = await writer.process(
topic=topic,
@@ -4485,6 +4495,16 @@ async def chat_refine_post(request: Request):
"relevance": "User refinement request"
}
plan = await orchestrator.generate_post_plan(
topic=topic,
profile_analysis=full_analysis,
company_strategy=company_strategy,
strategy_weight=getattr(post_type, 'strategy_weight', 0.5),
user_thoughts=message
)
if plan:
topic["post_plan"] = plan
# Use writer's revision capability
refined_post = await writer.process(
topic=topic,
@@ -4794,6 +4814,16 @@ async def company_chat_generate_post(request: Request):
)
topic = {"title": message[:100], "fact": message, "relevance": "Company-created content"}
plan = await orchestrator.generate_post_plan(
topic=topic,
profile_analysis=profile_analysis.full_analysis,
company_strategy=company_strategy,
strategy_weight=getattr(post_type, 'strategy_weight', 0.5),
user_thoughts=message
)
if plan:
topic["post_plan"] = plan
post_content = await writer.process(
topic=topic,
profile_analysis=profile_analysis.full_analysis,