fixed token tracking
This commit is contained in:
@@ -410,6 +410,11 @@ class TelegramService:
|
|||||||
# Single writer pass — no critic loop
|
# Single writer pass — no critic loop
|
||||||
from src.agents.writer import WriterAgent
|
from src.agents.writer import WriterAgent
|
||||||
writer = WriterAgent()
|
writer = WriterAgent()
|
||||||
|
writer.set_tracking_context(
|
||||||
|
operation="post_creation",
|
||||||
|
user_id=user_id,
|
||||||
|
company_id=str(profile.company_id) if profile and profile.company_id else None,
|
||||||
|
)
|
||||||
post_content = await writer.process(
|
post_content = await writer.process(
|
||||||
topic={"title": topic_text, "fact": topic_text, "relevance": "User-specified topic"},
|
topic={"title": topic_text, "fact": topic_text, "relevance": "User-specified topic"},
|
||||||
profile_analysis=profile_analysis.full_analysis,
|
profile_analysis=profile_analysis.full_analysis,
|
||||||
|
|||||||
Reference in New Issue
Block a user