haive.agents.reasoning_and_critique.tot.orchestrator ==================================================== .. py:module:: haive.agents.reasoning_and_critique.tot.orchestrator .. autoapi-nested-parse:: Tree of Thoughts Orchestrator using MultiAgent. This module implements the Tree of Thoughts algorithm using a multi-agent approach with MultiAgent coordinating the Candidate Generator and Solution Scorer agents. Classes ------- .. autoapisummary:: haive.agents.reasoning_and_critique.tot.orchestrator.TOTResult haive.agents.reasoning_and_critique.tot.orchestrator.TreeOfThoughtsOrchestrator Functions --------- .. autoapisummary:: haive.agents.reasoning_and_critique.tot.orchestrator.create_tot_solver Module Contents --------------- .. py:class:: TOTResult(/, **data) Bases: :py:obj:`pydantic.BaseModel` Result from Tree of Thoughts execution. Create a new model by parsing and validating input data from keyword arguments. Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model. `self` is explicitly positional-only to allow `self` as a field name. .. py:class:: TreeOfThoughtsOrchestrator(name = 'tot_orchestrator', engine = None, beam_width = 5, max_iterations = 3, temperature_generate = 0.7, temperature_score = 0.3) Orchestrates Tree of Thoughts algorithm using multiple agents. Initialize the Tree of Thoughts orchestrator. :param name: Name for the orchestrator :param engine: LLM configuration for the coordinator :param beam_width: Number of top solutions to keep at each iteration :param max_iterations: Maximum number of expansion iterations :param temperature_generate: Temperature for candidate generation :param temperature_score: Temperature for solution scoring .. py:method:: solve(problem, initial_seed = None, context = '') :async: Solve a problem using Tree of Thoughts. :param problem: The problem to solve :param initial_seed: Optional initial solution seed :param context: Additional context or constraints :returns: TOTResult with the best solution found .. py:function:: create_tot_solver(beam_width = 5, max_iterations = 3, **kwargs) :async: Factory function to create a Tree of Thoughts solver. :param beam_width: Number of solutions to keep at each iteration :param max_iterations: Maximum iterations to perform :param \*\*kwargs: Additional arguments for the orchestrator :returns: Configured TreeOfThoughtsOrchestrator instance