✅ Finalization Path (No Tool Calls)¶
_handle_no_tool_calls()¶
When the LLM produces a user-facing message (no more tools): When the model finishes without requesting tools, we run a fast “quality gate + polish” step to finalize the answer.
- Evaluations (quality gate) To catch issues with the produced message and inform the user about these. Typical checks is the hallucination detection. The EvaluationManager runs the checklist from ToolManager against the loop_response and latest assistant message. If any fail, we log a warning (future: retry with corrective instructions).
- Postprocessors Add additional information on top of the Message generated by the orchestrator. For example to add follow-up questions or attach stock ticker plots to the message
Code: