SavvyTelegram / thinking.py
StarpowerTechnology's picture
Upload 13 files
a6e3889 verified
"""
Thinking mode — full tool access before responding.
Sends an ack immediately, then edits/follows up with the final answer.
"""
from agent.savvy import Savvy
async def run_thinking(savvy: Savvy, user_input: str, ctx: dict) -> str:
"""
Give tools full access. quick_reply can surface partial info mid-loop.
Returns the final response text.
"""
messages = savvy.build_messages(user_input)
reply, _ = await savvy.reason(messages, ctx, use_tools=True)
return reply