fabricatio_thinking.capabilities.thinking

This module contains the capabilities for the thinking.

Classes

Thinking

This class contains the capabilities for the thinking.

Module Contents

class fabricatio_thinking.capabilities.thinking.Thinking(/, **data: Any)

Bases: fabricatio_core.capabilities.propose.Propose, abc.ABC

This class contains the capabilities for the thinking.

async thinking(question: str, vcs: fabricatio_thinking.rust.ThoughtVCS | None = None, max_steps: int | None = 25, **kwargs: Unpack[fabricatio_core.models.kwargs_types.ValidateKwargs[fabricatio_thinking.models.thinking.Thought]]) fabricatio_thinking.rust.ThoughtVCS

Perform a step-by-step thinking process to address the given question.

This method iteratively generates thoughts using the LLM, commits them to version control, revises previous thoughts if needed, and checks out branches based on the thought process. The loop continues until a maximum number of steps is reached or the end of the thinking process is signaled.

Parameters:
  • question (str) – The input question or task to be processed.

  • vcs (Optional[ThoughtVCS]) – An optional ThoughtVCS instance for managing version-controlled thoughts. If not provided, a new instance will be created.

  • max_steps (Optional[int]) – The maximum number of thinking steps to perform. If not specified, an effectively infinite number of steps will be allowed.

  • **kwargs – Additional keyword arguments passed to the underlying propose method.

Returns:

The final state of the ThoughtVCS after completing the thinking

process.

Return type:

ThoughtVCS